diff --git a/bin/tsc.js b/bin/tsc.js index af5f939a80d..cb0f409d84a 100644 --- a/bin/tsc.js +++ b/bin/tsc.js @@ -3458,14 +3458,21 @@ var ts; node.initializer = parseInitializer(true); return finishNode(node); } - function parseSignature(kind, returnToken) { + function parseSignature(kind, returnToken, returnTokenRequired) { if (kind === 121 /* ConstructSignature */) { parseExpected(78 /* NewKeyword */); } var typeParameters = parseTypeParameters(); var parameters = parseParameterList(7 /* OpenParenToken */, 8 /* CloseParenToken */); checkParameterList(parameters); - var type = parseOptional(returnToken) ? parseType() : undefined; + var type; + if (returnTokenRequired) { + parseExpected(returnToken); + type = parseType(); + } + else if (parseOptional(returnToken)) { + type = parseType(); + } return { typeParameters: typeParameters, parameters: parameters, @@ -3515,7 +3522,7 @@ var ts; } function parseSignatureMember(kind, returnToken) { var node = createNode(kind); - var sig = parseSignature(kind, returnToken); + var sig = parseSignature(kind, returnToken, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -3584,7 +3591,7 @@ var ts; } if (token === 7 /* OpenParenToken */ || token === 15 /* LessThanToken */) { node.kind = 116 /* Method */; - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -3640,7 +3647,7 @@ var ts; function parseFunctionType(signatureKind) { var node = createNode(125 /* TypeLiteral */); var member = createNode(signatureKind); - var sig = parseSignature(signatureKind, 23 /* EqualsGreaterThanToken */); + var sig = parseSignature(signatureKind, 23 /* EqualsGreaterThanToken */, true); member.typeParameters = sig.typeParameters; member.parameters = sig.parameters; member.type = sig.type; @@ -3828,7 +3835,7 @@ var ts; } var pos = getNodePos(); if (triState === 1 /* True */) { - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); if (parseExpected(23 /* EqualsGreaterThanToken */) || token === 5 /* OpenBraceToken */) { return parseArrowExpressionTail(pos, sig, false); } @@ -3889,7 +3896,7 @@ var ts; } function tryParseSignatureIfArrowOrBraceFollows() { return tryParse(function () { - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); if (token === 23 /* EqualsGreaterThanToken */ || token === 5 /* OpenBraceToken */) { return sig; } @@ -4161,7 +4168,7 @@ var ts; var node = createNode(129 /* PropertyAssignment */); node.name = parsePropertyName(); if (token === 7 /* OpenParenToken */ || token === 15 /* LessThanToken */) { - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); var body = parseBody(false); node.initializer = makeFunctionExpression(136 /* FunctionExpression */, node.pos, undefined, sig, body); } @@ -4240,7 +4247,7 @@ var ts; var pos = getNodePos(); parseExpected(73 /* FunctionKeyword */); var name = isIdentifier() ? parseIdentifier() : undefined; - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); var body = parseBody(false); if (name && isInStrictMode && isEvalOrArgumentsIdentifier(name)) { reportInvalidUseInStrictMode(name); @@ -4752,7 +4759,7 @@ var ts; node.flags = flags; parseExpected(73 /* FunctionKeyword */); node.name = parseIdentifier(); - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -4766,7 +4773,7 @@ var ts; var node = createNode(117 /* Constructor */, pos); node.flags = flags; parseExpected(103 /* ConstructorKeyword */); - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -4790,7 +4797,7 @@ var ts; var method = createNode(116 /* Method */, pos); method.flags = flags; method.name = name; - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); method.typeParameters = sig.typeParameters; method.parameters = sig.parameters; method.type = sig.type; @@ -4858,7 +4865,7 @@ var ts; var node = createNode(kind, pos); node.flags = flags; node.name = parsePropertyName(); - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -5421,17 +5428,27 @@ var ts; var start = refPos; var length = refEnd - refPos; } + var diagnostic; if (hasExtension(filename)) { if (!ts.fileExtensionIs(filename, ".ts")) { - errors.push(ts.createFileDiagnostic(refFile, start, length, ts.Diagnostics.File_0_must_have_extension_ts_or_d_ts, filename)); + diagnostic = ts.Diagnostics.File_0_must_have_extension_ts_or_d_ts; } else if (!findSourceFile(filename, isDefaultLib, refFile, refPos, refEnd)) { - errors.push(ts.createFileDiagnostic(refFile, start, length, ts.Diagnostics.File_0_not_found, filename)); + diagnostic = ts.Diagnostics.File_0_not_found; } } else { if (!(findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) || findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd))) { - errors.push(ts.createFileDiagnostic(refFile, start, length, ts.Diagnostics.File_0_not_found, filename + ".ts")); + diagnostic = ts.Diagnostics.File_0_not_found; + filename += ".ts"; + } + } + if (diagnostic) { + if (refFile) { + errors.push(ts.createFileDiagnostic(refFile, start, length, diagnostic, filename)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostic, filename)); } } } @@ -10897,10 +10914,12 @@ var ts; continue; } if (getDeclarationFlagsFromSymbol(sourceProp) & 32 /* Private */ || getDeclarationFlagsFromSymbol(targetProp) & 32 /* Private */) { - if (reportErrors) { - reportError(ts.Diagnostics.Private_property_0_cannot_be_reimplemented, symbolToString(targetProp)); + if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { + if (reportErrors) { + reportError(ts.Diagnostics.Private_property_0_cannot_be_reimplemented, symbolToString(targetProp)); + } + return false; } - return false; } if (!isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors)) { if (reportErrors) { diff --git a/bin/typescriptServices.js b/bin/typescriptServices.js index 1efb6d232e3..a11d372b7e7 100644 --- a/bin/typescriptServices.js +++ b/bin/typescriptServices.js @@ -3263,14 +3263,21 @@ var ts; node.initializer = parseInitializer(true); return finishNode(node); } - function parseSignature(kind, returnToken) { + function parseSignature(kind, returnToken, returnTokenRequired) { if (kind === 121 /* ConstructSignature */) { parseExpected(78 /* NewKeyword */); } var typeParameters = parseTypeParameters(); var parameters = parseParameterList(7 /* OpenParenToken */, 8 /* CloseParenToken */); checkParameterList(parameters); - var type = parseOptional(returnToken) ? parseType() : undefined; + var type; + if (returnTokenRequired) { + parseExpected(returnToken); + type = parseType(); + } + else if (parseOptional(returnToken)) { + type = parseType(); + } return { typeParameters: typeParameters, parameters: parameters, @@ -3320,7 +3327,7 @@ var ts; } function parseSignatureMember(kind, returnToken) { var node = createNode(kind); - var sig = parseSignature(kind, returnToken); + var sig = parseSignature(kind, returnToken, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -3389,7 +3396,7 @@ var ts; } if (token === 7 /* OpenParenToken */ || token === 15 /* LessThanToken */) { node.kind = 116 /* Method */; - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -3445,7 +3452,7 @@ var ts; function parseFunctionType(signatureKind) { var node = createNode(125 /* TypeLiteral */); var member = createNode(signatureKind); - var sig = parseSignature(signatureKind, 23 /* EqualsGreaterThanToken */); + var sig = parseSignature(signatureKind, 23 /* EqualsGreaterThanToken */, true); member.typeParameters = sig.typeParameters; member.parameters = sig.parameters; member.type = sig.type; @@ -3633,7 +3640,7 @@ var ts; } var pos = getNodePos(); if (triState === 1 /* True */) { - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); if (parseExpected(23 /* EqualsGreaterThanToken */) || token === 5 /* OpenBraceToken */) { return parseArrowExpressionTail(pos, sig, false); } @@ -3694,7 +3701,7 @@ var ts; } function tryParseSignatureIfArrowOrBraceFollows() { return tryParse(function () { - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); if (token === 23 /* EqualsGreaterThanToken */ || token === 5 /* OpenBraceToken */) { return sig; } @@ -3966,7 +3973,7 @@ var ts; var node = createNode(129 /* PropertyAssignment */); node.name = parsePropertyName(); if (token === 7 /* OpenParenToken */ || token === 15 /* LessThanToken */) { - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); var body = parseBody(false); node.initializer = makeFunctionExpression(136 /* FunctionExpression */, node.pos, undefined, sig, body); } @@ -4045,7 +4052,7 @@ var ts; var pos = getNodePos(); parseExpected(73 /* FunctionKeyword */); var name = isIdentifier() ? parseIdentifier() : undefined; - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); var body = parseBody(false); if (name && isInStrictMode && isEvalOrArgumentsIdentifier(name)) { reportInvalidUseInStrictMode(name); @@ -4557,7 +4564,7 @@ var ts; node.flags = flags; parseExpected(73 /* FunctionKeyword */); node.name = parseIdentifier(); - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -4571,7 +4578,7 @@ var ts; var node = createNode(117 /* Constructor */, pos); node.flags = flags; parseExpected(103 /* ConstructorKeyword */); - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -4595,7 +4602,7 @@ var ts; var method = createNode(116 /* Method */, pos); method.flags = flags; method.name = name; - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); method.typeParameters = sig.typeParameters; method.parameters = sig.parameters; method.type = sig.type; @@ -4663,7 +4670,7 @@ var ts; var node = createNode(kind, pos); node.flags = flags; node.name = parsePropertyName(); - var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */); + var sig = parseSignature(120 /* CallSignature */, 42 /* ColonToken */, false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -5226,17 +5233,27 @@ var ts; var start = refPos; var length = refEnd - refPos; } + var diagnostic; if (hasExtension(filename)) { if (!ts.fileExtensionIs(filename, ".ts")) { - errors.push(ts.createFileDiagnostic(refFile, start, length, ts.Diagnostics.File_0_must_have_extension_ts_or_d_ts, filename)); + diagnostic = ts.Diagnostics.File_0_must_have_extension_ts_or_d_ts; } else if (!findSourceFile(filename, isDefaultLib, refFile, refPos, refEnd)) { - errors.push(ts.createFileDiagnostic(refFile, start, length, ts.Diagnostics.File_0_not_found, filename)); + diagnostic = ts.Diagnostics.File_0_not_found; } } else { if (!(findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) || findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd))) { - errors.push(ts.createFileDiagnostic(refFile, start, length, ts.Diagnostics.File_0_not_found, filename + ".ts")); + diagnostic = ts.Diagnostics.File_0_not_found; + filename += ".ts"; + } + } + if (diagnostic) { + if (refFile) { + errors.push(ts.createFileDiagnostic(refFile, start, length, diagnostic, filename)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostic, filename)); } } } @@ -10702,10 +10719,12 @@ var ts; continue; } if (getDeclarationFlagsFromSymbol(sourceProp) & 32 /* Private */ || getDeclarationFlagsFromSymbol(targetProp) & 32 /* Private */) { - if (reportErrors) { - reportError(ts.Diagnostics.Private_property_0_cannot_be_reimplemented, symbolToString(targetProp)); + if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { + if (reportErrors) { + reportError(ts.Diagnostics.Private_property_0_cannot_be_reimplemented, symbolToString(targetProp)); + } + return false; } - return false; } if (!isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors)) { if (reportErrors) { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 17329854017..df515e7a8c8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2967,10 +2967,12 @@ module ts { } if (getDeclarationFlagsFromSymbol(sourceProp) & NodeFlags.Private || getDeclarationFlagsFromSymbol(targetProp) & NodeFlags.Private) { - if (reportErrors) { - reportError(Diagnostics.Private_property_0_cannot_be_reimplemented, symbolToString(targetProp)); + if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { + if (reportErrors) { + reportError(Diagnostics.Private_property_0_cannot_be_reimplemented, symbolToString(targetProp)); + } + return false; } - return false; } if (!isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors)) { if (reportErrors) { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index bc01cb7a9e0..7d24a133b8d 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1400,14 +1400,25 @@ module ts { return finishNode(node); } - function parseSignature(kind: SyntaxKind, returnToken: SyntaxKind): ParsedSignature { + function parseSignature(kind: SyntaxKind, returnToken: SyntaxKind, returnTokenRequired: boolean): ParsedSignature { if (kind === SyntaxKind.ConstructSignature) { parseExpected(SyntaxKind.NewKeyword); } var typeParameters = parseTypeParameters(); var parameters = parseParameterList(SyntaxKind.OpenParenToken, SyntaxKind.CloseParenToken); checkParameterList(parameters); - var type = parseOptional(returnToken) ? parseType() : undefined; + + var type: TypeNode; + + if (returnTokenRequired) { + parseExpected(returnToken); + type = parseType(); + } + else if (parseOptional(returnToken)) + { + type = parseType(); + } + return { typeParameters: typeParameters, parameters: parameters, @@ -1471,7 +1482,7 @@ module ts { function parseSignatureMember(kind: SyntaxKind, returnToken: SyntaxKind): SignatureDeclaration { var node = createNode(kind); - var sig = parseSignature(kind, returnToken); + var sig = parseSignature(kind, returnToken, /* returnTokenRequired */ false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -1544,7 +1555,7 @@ module ts { } if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { node.kind = SyntaxKind.Method; - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); (node).typeParameters = sig.typeParameters; (node).parameters = sig.parameters; (node).type = sig.type; @@ -1616,7 +1627,7 @@ module ts { function parseFunctionType(signatureKind: SyntaxKind): TypeLiteralNode { var node = createNode(SyntaxKind.TypeLiteral); var member = createNode(signatureKind); - var sig = parseSignature(signatureKind, SyntaxKind.EqualsGreaterThanToken); + var sig = parseSignature(signatureKind, SyntaxKind.EqualsGreaterThanToken, /* returnTokenRequired */ true); member.typeParameters = sig.typeParameters; member.parameters = sig.parameters; member.type = sig.type; @@ -1875,7 +1886,7 @@ module ts { var pos = getNodePos(); if (triState === Tristate.True) { - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); // If we have an arrow, then try to parse the body. // Even if not, try to parse if we have an opening brace, just in case we're in an error state. @@ -1978,7 +1989,7 @@ module ts { function tryParseSignatureIfArrowOrBraceFollows(): ParsedSignature { return tryParse(() => { - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); // Parsing a signature isn't enough. // Parenthesized arrow signatures often look like other valid expressions. @@ -2320,7 +2331,7 @@ module ts { var node = createNode(SyntaxKind.PropertyAssignment); node.name = parsePropertyName(); if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); var body = parseBody(/* ignoreMissingOpenBrace */ false); // do not propagate property name as name for function expression // for scenarios like @@ -2420,7 +2431,7 @@ module ts { var pos = getNodePos(); parseExpected(SyntaxKind.FunctionKeyword); var name = isIdentifier() ? parseIdentifier() : undefined; - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); var body = parseBody(/* ignoreMissingOpenBrace */ false); if (name && isInStrictMode && isEvalOrArgumentsIdentifier(name)) { // It is a SyntaxError to use within strict mode code the identifiers eval or arguments as the @@ -3035,7 +3046,7 @@ module ts { if (flags) node.flags = flags; parseExpected(SyntaxKind.FunctionKeyword); node.name = parseIdentifier(); - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -3052,7 +3063,7 @@ module ts { var node = createNode(SyntaxKind.Constructor, pos); node.flags = flags; parseExpected(SyntaxKind.ConstructorKeyword); - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -3079,7 +3090,7 @@ module ts { var method = createNode(SyntaxKind.Method, pos); method.flags = flags; method.name = name; - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); method.typeParameters = sig.typeParameters; method.parameters = sig.parameters; method.type = sig.type; @@ -3152,7 +3163,7 @@ module ts { var node = createNode(kind, pos); node.flags = flags; node.name = parsePropertyName(); - var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken); + var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); node.typeParameters = sig.typeParameters; node.parameters = sig.parameters; node.type = sig.type; @@ -3822,17 +3833,28 @@ module ts { var start = refPos; var length = refEnd - refPos; } + var diagnostic: DiagnosticMessage; if (hasExtension(filename)) { if (!fileExtensionIs(filename, ".ts")) { - errors.push(createFileDiagnostic(refFile, start, length, Diagnostics.File_0_must_have_extension_ts_or_d_ts, filename)); + diagnostic = Diagnostics.File_0_must_have_extension_ts_or_d_ts; } else if (!findSourceFile(filename, isDefaultLib, refFile, refPos, refEnd)) { - errors.push(createFileDiagnostic(refFile, start, length, Diagnostics.File_0_not_found, filename)); + diagnostic = Diagnostics.File_0_not_found; } } else { if (!(findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) || findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd))) { - errors.push(createFileDiagnostic(refFile, start, length, Diagnostics.File_0_not_found, filename + ".ts")); + diagnostic = Diagnostics.File_0_not_found; + filename += ".ts"; + } + } + + if (diagnostic) { + if (refFile) { + errors.push(createFileDiagnostic(refFile, start, length, diagnostic, filename)); + } + else { + errors.push(createCompilerDiagnostic(diagnostic, filename)); } } } diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index 60da87b1dfc..31d009c4765 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -156,10 +156,7 @@ class CompilerBaselineRunner extends RunnerBase { return file.writeByteOrderMark ? "\u00EF\u00BB\u00BF" : ""; } - function getErrorBaseline(toBeCompiled: { unitName: string; content: string }[], - otherFiles: { unitName: string; content: string }[], - result: Harness.Compiler.CompilerResult - ) { + function getErrorBaseline(toBeCompiled: { unitName: string; content: string }[], otherFiles: { unitName: string; content: string }[], result: Harness.Compiler.CompilerResult) { return Harness.Compiler.getErrorBaseline(toBeCompiled.concat(otherFiles), result.errors); } @@ -168,7 +165,7 @@ class CompilerBaselineRunner extends RunnerBase { if (this.errors) { Harness.Baseline.runBaseline('Correct errors for ' + fileName, justName.replace(/\.ts$/, '.errors.txt'), (): string => { if (result.errors.length === 0) return null; - + return getErrorBaseline(toBeCompiled, otherFiles, result); }); } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index c227dac7bb0..268d2125c2c 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -807,9 +807,7 @@ module Harness { return errorOutput; } - export function getErrorBaseline(inputFiles: { unitName: string; content: string }[], - diagnostics: HarnessDiagnostic[] - ) { + export function getErrorBaseline(inputFiles: { unitName: string; content: string }[], diagnostics: HarnessDiagnostic[]) { var outputLines: string[] = []; // Count up all the errors we find so we don't miss any @@ -820,13 +818,13 @@ module Harness { .split('\n') .map(s => s.length > 0 && s.charAt(s.length - 1) === '\r' ? s.substr(0, s.length - 1) : s) .filter(s => s.length > 0) - .map(s => '!!! ' + s); + .map(s => '!!! ' + error.category + " TS" + error.code + ": " + s); errLines.forEach(e => outputLines.push(e)); totalErrorsReported++; } - // Report global errors: + // Report global errors var globalErrors = diagnostics.filter(err => !err.filename); globalErrors.forEach(err => outputErrorText(err)); @@ -896,7 +894,8 @@ module Harness { // Verify we didn't miss any errors in total assert.equal(totalErrorsReported, diagnostics.length, 'total number of errors'); - return outputLines.join('\r\n'); + return minimalDiagnosticsToString(diagnostics) + + sys.newLine + sys.newLine + outputLines.join('\r\n'); } /* TODO: Delete? @@ -917,7 +916,7 @@ module Harness { export function recreate(options?: { useMinimalDefaultLib: boolean; noImplicitAny: boolean; }) { } - /** The harness' compiler instance used when tests are actually run. Reseting or changing settings of this compiler instance must be done within a testcase (i.e., describe/it) */ + /** The harness' compiler instance used when tests are actually run. Reseting or changing settings of this compiler instance must be done within a test case (i.e., describe/it) */ var harnessCompiler: HarnessCompiler; /** Returns the singleton harness compiler instance for generating and running tests. diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index b0f3e939d30..c294f5b1be4 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -4,7 +4,7 @@ // Test case is json of below type in tests/cases/project/ interface ProjectRunnerTestCase { scenario: string; - projectRoot: string; // project where it lives - this also is the current dictory when compiling + projectRoot: string; // project where it lives - this also is the current directory when compiling inputFiles: string[]; // list of input files to be given to program out?: string; // --out outDir?: string; // --outDir @@ -22,7 +22,7 @@ interface ProjectRunnerTestCase { interface ProjectRunnerTestCaseResolutionInfo extends ProjectRunnerTestCase { // Apart from actual test case the results of the resolution resolvedInputFiles: string[]; // List of files that were asked to read by compiler - emittedFiles: string[]; // List of files that wre emitted by the compiler + emittedFiles: string[]; // List of files that were emitted by the compiler } interface BatchCompileProjectTestCaseEmittedFile extends Harness.Compiler.GeneratedFile { @@ -69,7 +69,7 @@ class ProjectRunner extends RunnerBase { testCase = JSON.parse(testFileText); } catch (e) { - assert(false, "Testcase: " + testCaseFileName + " doesnt not contain valid json format: " + e.message); + assert(false, "Testcase: " + testCaseFileName + " does not contain valid json format: " + e.message); } var testCaseJustName = testCaseFileName.replace(/^.*[\\\/]/, '').replace(/\.json/, ""); @@ -87,7 +87,7 @@ class ProjectRunner extends RunnerBase { } // When test case output goes to tests/baselines/local/projectOutput/testCaseName/moduleKind/ - // We have these two separate locations because when compairing baselines the baseline verifier will delete the existing file + // We have these two separate locations because when comparing baselines the baseline verifier will delete the existing file // so even if it was created by compiler in that location, the file will be deleted by verified before we can read it // so lets keep these two locations separate function getProjectOutputFolder(filename: string, moduleKind: ts.ModuleKind) { @@ -228,7 +228,7 @@ class ProjectRunner extends RunnerBase { var diskRelativeName = ts.getRelativePathToDirectoryOrUrl(testCase.projectRoot, diskFileName, getCurrentDirectory(), false); if (ts.isRootedDiskPath(diskRelativeName) || diskRelativeName.substr(0, 3) === "../") { - // If the generated output file recides in the parent folder or is rooted path, + // If the generated output file resides in the parent folder or is rooted path, // we need to instead create files that can live in the project reference folder // but make sure extension of these files matches with the filename the compiler asked to write diskRelativeName = "diskFile" + nonSubfolderDiskFiles++ + @@ -299,13 +299,11 @@ class ProjectRunner extends RunnerBase { return { unitName: sourceFile.filename, content: sourceFile.text }; }); var diagnostics = ts.map(compilerResult.errors, error => Harness.Compiler.getMinimalDiagnostic(error)); - var errors = Harness.Compiler.minimalDiagnosticsToString(diagnostics); - errors += sys.newLine + sys.newLine + Harness.Compiler.getErrorBaseline(inputFiles, diagnostics); - return errors; + return Harness.Compiler.getErrorBaseline(inputFiles, diagnostics); } - describe('Compiling project for ' + testCase.scenario +': testcase ' + testCaseFileName, () => { + describe('Compiling project for ' + testCase.scenario + ': testcase ' + testCaseFileName, () => { function verifyCompilerResults(compilerResult: BatchCompileProjectTestCaseResult) { function getCompilerResolutionInfo() { var resolutionInfo: ProjectRunnerTestCaseResolutionInfo = { diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index 93d003bf4db..f7cc699c075 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -152,9 +152,7 @@ module RWC { return null; } - return Harness.Compiler.minimalDiagnosticsToString(compilerResult.errors) + - sys.newLine + sys.newLine + - Harness.Compiler.getErrorBaseline(inputFiles.concat(otherFiles), compilerResult.errors); + return Harness.Compiler.getErrorBaseline(inputFiles.concat(otherFiles), compilerResult.errors); }, false, baselineOpts); }); diff --git a/tests/baselines/reference/ArrowFunction1.errors.txt b/tests/baselines/reference/ArrowFunction1.errors.txt index ed868daec13..96f77039224 100644 --- a/tests/baselines/reference/ArrowFunction1.errors.txt +++ b/tests/baselines/reference/ArrowFunction1.errors.txt @@ -1,6 +1,9 @@ +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts(1,13): error TS1110: Type expected. + + ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts (1 errors) ==== var v = (a: ) => { ~ -!!! Type expected. +!!! error TS1110: Type expected. }; \ No newline at end of file diff --git a/tests/baselines/reference/ArrowFunction2.errors.txt b/tests/baselines/reference/ArrowFunction2.errors.txt index eef47a30ba2..26e1f336cb6 100644 --- a/tests/baselines/reference/ArrowFunction2.errors.txt +++ b/tests/baselines/reference/ArrowFunction2.errors.txt @@ -1,8 +1,12 @@ +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction2.ts(1,14): error TS1009: Trailing comma not allowed. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction2.ts(1,13): error TS2304: Cannot find name 'b'. + + ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction2.ts (2 errors) ==== var v = (a: b,) => { ~ -!!! Trailing comma not allowed. +!!! error TS1009: Trailing comma not allowed. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. }; \ No newline at end of file diff --git a/tests/baselines/reference/ArrowFunction3.errors.txt b/tests/baselines/reference/ArrowFunction3.errors.txt index a286116ff29..be20d77c343 100644 --- a/tests/baselines/reference/ArrowFunction3.errors.txt +++ b/tests/baselines/reference/ArrowFunction3.errors.txt @@ -1,10 +1,15 @@ +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts(1,12): error TS1005: ',' expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts(1,14): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts(1,10): error TS2304: Cannot find name 'a'. + + ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts (3 errors) ==== var v = (a): => { ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. }; \ No newline at end of file diff --git a/tests/baselines/reference/ArrowFunctionExpression1.errors.txt b/tests/baselines/reference/ArrowFunctionExpression1.errors.txt index 25c9af3d286..593b75d4ee2 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.errors.txt +++ b/tests/baselines/reference/ArrowFunctionExpression1.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/ArrowFunctionExpression1.ts(1,10): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/ArrowFunctionExpression1.ts (1 errors) ==== var v = (public x: string) => { }; ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. \ No newline at end of file +!!! error TS2369: A parameter property is only allowed in a constructor implementation. \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt index f7d6aafc017..aa97ca3caa5 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(10,19): error TS2304: Cannot find name 'T'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(20,12): error TS2304: Cannot find name 'T'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(22,23): error TS2304: Cannot find name 'T'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(35,26): error TS2304: Cannot find name 'T'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(46,15): error TS2304: Cannot find name 'T'. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts (5 errors) ==== // all expected to be errors @@ -10,7 +17,7 @@ module clodule1 { function f(x: T) { } ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } class clodule2{ @@ -22,11 +29,11 @@ module clodule2 { var x: T; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. class D{ ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. id: string; value: U; } @@ -41,7 +48,7 @@ module clodule3 { export var y = { id: T }; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } class clodule4{ @@ -54,7 +61,7 @@ class D { name: T; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt index dad412363f7..2ab89730405 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (1 errors) ==== class clodule { id: string; @@ -10,7 +13,7 @@ // error: duplicate identifier expected export function fn(x: T, y: T): T { ~~ -!!! Duplicate identifier 'fn'. +!!! error TS2300: Duplicate identifier 'fn'. return x; } } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt index c45ffab4156..5db506d1052 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (1 errors) ==== class clodule { id: string; @@ -10,7 +13,7 @@ // error: duplicate identifier expected export function fn(x: T, y: T): T { ~~ -!!! Duplicate identifier 'fn'. +!!! error TS2300: Duplicate identifier 'fn'. return x; } } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt index c38333f9732..6121bba66fb 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts(11,16): error TS2341: Property 'clodule.sfn' is inaccessible. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts (1 errors) ==== class clodule { id: string; @@ -11,7 +14,7 @@ export function fn(x: T, y: T): number { return clodule.sfn('a'); ~~~~~~~~~~~ -!!! Property 'clodule.sfn' is inaccessible. +!!! error TS2341: Property 'clodule.sfn' is inaccessible. } } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt index eb2ef95f795..9b62647f40b 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (2 errors) ==== class Point { constructor(public x: number, public y: number) { } @@ -8,7 +12,7 @@ module Point { export function Origin() { return null; } //expected duplicate identifier error ~~~~~~ -!!! Duplicate identifier 'Origin'. +!!! error TS2300: Duplicate identifier 'Origin'. } @@ -22,6 +26,6 @@ export module Point { export function Origin() { return ""; }//expected duplicate identifier error ~~~~~~ -!!! Duplicate identifier 'Origin'. +!!! error TS2300: Duplicate identifier 'Origin'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt index ad395751ebf..b160146f6f7 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(8,16): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(20,20): error TS2300: Duplicate identifier 'Origin'. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (2 errors) ==== class Point { constructor(public x: number, public y: number) { } @@ -8,7 +12,7 @@ module Point { export var Origin = ""; //expected duplicate identifier error ~~~~~~ -!!! Duplicate identifier 'Origin'. +!!! error TS2300: Duplicate identifier 'Origin'. } @@ -22,6 +26,6 @@ export module Point { export var Origin = ""; //expected duplicate identifier error ~~~~~~ -!!! Duplicate identifier 'Origin'. +!!! error TS2300: Duplicate identifier 'Origin'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt index d47fc51f4e8..4c707dfd861 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged + + ==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ==== module X.Y { export class Point { @@ -14,7 +17,7 @@ module X.Y { export module Point { ~~~~~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); } } diff --git a/tests/baselines/reference/ClassDeclaration10.errors.txt b/tests/baselines/reference/ClassDeclaration10.errors.txt index be26c1d5b47..4d195961f81 100644 --- a/tests/baselines/reference/ClassDeclaration10.errors.txt +++ b/tests/baselines/reference/ClassDeclaration10.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/ClassDeclaration10.ts(2,4): error TS2390: Constructor implementation is missing. +tests/cases/compiler/ClassDeclaration10.ts(3,4): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/ClassDeclaration10.ts (2 errors) ==== class C { constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration11.errors.txt b/tests/baselines/reference/ClassDeclaration11.errors.txt index b92a04cec6c..518e62803ea 100644 --- a/tests/baselines/reference/ClassDeclaration11.errors.txt +++ b/tests/baselines/reference/ClassDeclaration11.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/ClassDeclaration11.ts(2,4): error TS2390: Constructor implementation is missing. + + ==== tests/cases/compiler/ClassDeclaration11.ts (1 errors) ==== class C { constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. foo() { } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration13.errors.txt b/tests/baselines/reference/ClassDeclaration13.errors.txt index 406d41c20de..7b001022d9d 100644 --- a/tests/baselines/reference/ClassDeclaration13.errors.txt +++ b/tests/baselines/reference/ClassDeclaration13.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/ClassDeclaration13.ts(3,4): error TS2389: Function implementation name must be 'foo'. + + ==== tests/cases/compiler/ClassDeclaration13.ts (1 errors) ==== class C { foo(); bar() { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration14.errors.txt b/tests/baselines/reference/ClassDeclaration14.errors.txt index cf181a7eb8b..af87daef997 100644 --- a/tests/baselines/reference/ClassDeclaration14.errors.txt +++ b/tests/baselines/reference/ClassDeclaration14.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/ClassDeclaration14.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/ClassDeclaration14.ts(3,4): error TS2390: Constructor implementation is missing. + + ==== tests/cases/compiler/ClassDeclaration14.ts (2 errors) ==== class C { foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration15.errors.txt b/tests/baselines/reference/ClassDeclaration15.errors.txt index 08c33f18758..27cd8f9aa4d 100644 --- a/tests/baselines/reference/ClassDeclaration15.errors.txt +++ b/tests/baselines/reference/ClassDeclaration15.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/ClassDeclaration15.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/ClassDeclaration15.ts (1 errors) ==== class C { foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. constructor() { } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration21.errors.txt b/tests/baselines/reference/ClassDeclaration21.errors.txt index 8b49f1df543..36dc01d75d0 100644 --- a/tests/baselines/reference/ClassDeclaration21.errors.txt +++ b/tests/baselines/reference/ClassDeclaration21.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/ClassDeclaration21.ts(3,5): error TS2389: Function implementation name must be '0'. + + ==== tests/cases/compiler/ClassDeclaration21.ts (1 errors) ==== class C { 0(); 1() { } ~ -!!! Function implementation name must be '0'. +!!! error TS2389: Function implementation name must be '0'. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration22.errors.txt b/tests/baselines/reference/ClassDeclaration22.errors.txt index 34832185e12..a297ae82596 100644 --- a/tests/baselines/reference/ClassDeclaration22.errors.txt +++ b/tests/baselines/reference/ClassDeclaration22.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/ClassDeclaration22.ts(3,5): error TS2389: Function implementation name must be '"foo"'. + + ==== tests/cases/compiler/ClassDeclaration22.ts (1 errors) ==== class C { "foo"(); "bar"() { } ~~~~~ -!!! Function implementation name must be '"foo"'. +!!! error TS2389: Function implementation name must be '"foo"'. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration24.errors.txt b/tests/baselines/reference/ClassDeclaration24.errors.txt index a64ad658991..62d26eb792a 100644 --- a/tests/baselines/reference/ClassDeclaration24.errors.txt +++ b/tests/baselines/reference/ClassDeclaration24.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/ClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any' + + ==== tests/cases/compiler/ClassDeclaration24.ts (1 errors) ==== class any { ~~~ -!!! Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any' } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration25.errors.txt b/tests/baselines/reference/ClassDeclaration25.errors.txt index 3a73349506e..964974481d6 100644 --- a/tests/baselines/reference/ClassDeclaration25.errors.txt +++ b/tests/baselines/reference/ClassDeclaration25.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/ClassDeclaration25.ts(6,5): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/ClassDeclaration25.ts(7,5): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/ClassDeclaration25.ts (2 errors) ==== interface IList { data(): T; @@ -6,9 +10,9 @@ class List implements IList { data(): U; ~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. next(): string; ~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration8.errors.txt b/tests/baselines/reference/ClassDeclaration8.errors.txt index ebf1cadd764..3894c91bdc8 100644 --- a/tests/baselines/reference/ClassDeclaration8.errors.txt +++ b/tests/baselines/reference/ClassDeclaration8.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/ClassDeclaration8.ts(2,3): error TS2390: Constructor implementation is missing. + + ==== tests/cases/compiler/ClassDeclaration8.ts (1 errors) ==== class C { constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration9.errors.txt b/tests/baselines/reference/ClassDeclaration9.errors.txt index 03813d14683..7f13d41001a 100644 --- a/tests/baselines/reference/ClassDeclaration9.errors.txt +++ b/tests/baselines/reference/ClassDeclaration9.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/ClassDeclaration9.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/ClassDeclaration9.ts (1 errors) ==== class C { foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/ExportAssignment7.errors.txt b/tests/baselines/reference/ExportAssignment7.errors.txt index ff05fb7eda0..6ba0f480e7f 100644 --- a/tests/baselines/reference/ExportAssignment7.errors.txt +++ b/tests/baselines/reference/ExportAssignment7.errors.txt @@ -1,11 +1,16 @@ +tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2304: Cannot find name 'B'. +tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/compiler/ExportAssignment7.ts (3 errors) ==== export class C { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. } export = B; ~~~~~~~~~~~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file diff --git a/tests/baselines/reference/ExportAssignment8.errors.txt b/tests/baselines/reference/ExportAssignment8.errors.txt index 2f1d1f5b960..4dc35a9f0b7 100644 --- a/tests/baselines/reference/ExportAssignment8.errors.txt +++ b/tests/baselines/reference/ExportAssignment8.errors.txt @@ -1,11 +1,16 @@ +tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2304: Cannot find name 'B'. +tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/compiler/ExportAssignment8.ts (3 errors) ==== export = B; ~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. export class C { } \ No newline at end of file diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.errors.txt b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.errors.txt index b56c3a9fe93..81798538bb7 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.errors.txt +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts(8,27): error TS1005: ';' expected. +tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts(8,43): error TS1005: ';' expected. +tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts(9,30): error TS1005: ';' expected. + + ==== tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts (3 errors) ==== module A { @@ -8,11 +13,11 @@ export var UnitSquare : { top: { left: Point, right: Point }, ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. bottom: { left: Point, right: Point } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. } = null; } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt index 1a9ea82a006..df266681812 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. +tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/function.ts (0 errors) ==== module A { export function Point() { @@ -9,7 +14,7 @@ module A { export module Point { ~~~~~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } } @@ -18,7 +23,7 @@ var fn: () => { x: number; y: number }; var fn = A.Point; ~~ -!!! Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. var cl: { x: number; y: number; } var cl = A.Point(); @@ -40,7 +45,7 @@ var fn: () => { x: number; y: number }; var fn = B.Point; // not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected ~~ -!!! Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. var cl: { x: number; y: number; } var cl = B.Point(); diff --git a/tests/baselines/reference/FunctionDeclaration3.errors.txt b/tests/baselines/reference/FunctionDeclaration3.errors.txt index 40a51283449..648d2a7ff79 100644 --- a/tests/baselines/reference/FunctionDeclaration3.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration3.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/FunctionDeclaration3.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/FunctionDeclaration3.ts (1 errors) ==== function foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. \ No newline at end of file +!!! error TS2391: Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration4.errors.txt b/tests/baselines/reference/FunctionDeclaration4.errors.txt index da15ad0efa4..a744ac9bfd5 100644 --- a/tests/baselines/reference/FunctionDeclaration4.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration4.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/FunctionDeclaration4.ts(2,10): error TS2389: Function implementation name must be 'foo'. + + ==== tests/cases/compiler/FunctionDeclaration4.ts (1 errors) ==== function foo(); function bar() { } ~~~ -!!! Function implementation name must be 'foo'. \ No newline at end of file +!!! error TS2389: Function implementation name must be 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration6.errors.txt b/tests/baselines/reference/FunctionDeclaration6.errors.txt index c7e039cac13..89f9aff9ca7 100644 --- a/tests/baselines/reference/FunctionDeclaration6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration6.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/FunctionDeclaration6.ts(3,14): error TS2389: Function implementation name must be 'foo'. + + ==== tests/cases/compiler/FunctionDeclaration6.ts (1 errors) ==== { function foo(); function bar() { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration7.errors.txt b/tests/baselines/reference/FunctionDeclaration7.errors.txt index fcc48feb2d8..8f8230fe73e 100644 --- a/tests/baselines/reference/FunctionDeclaration7.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/FunctionDeclaration7.ts(2,13): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/FunctionDeclaration7.ts (1 errors) ==== module M { function foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/InterfaceDeclaration8.errors.txt b/tests/baselines/reference/InterfaceDeclaration8.errors.txt index eba4ccd7023..e916947d2bd 100644 --- a/tests/baselines/reference/InterfaceDeclaration8.errors.txt +++ b/tests/baselines/reference/InterfaceDeclaration8.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/InterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string' + + ==== tests/cases/compiler/InterfaceDeclaration8.ts (1 errors) ==== interface string { ~~~~~~ -!!! Interface name cannot be 'string' +!!! error TS2427: Interface name cannot be 'string' } \ No newline at end of file diff --git a/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt b/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt index c32511eba0d..9fd7043faa6 100644 --- a/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt +++ b/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts(5,9): error TS2304: Cannot find name 'M'. +tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts(7,15): error TS2304: Cannot find name 'M'. + + ==== tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts (2 errors) ==== module M { export interface Point { x: number; y: number } @@ -5,9 +9,9 @@ var m = M; // Error, not instantiated can not be used as var ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. var x: typeof M; // Error only a namespace ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. \ No newline at end of file diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt b/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt index c96547e0aa7..6ed8a2d29cd 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt +++ b/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/MemberAccessorDeclaration15.ts(2,8): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/MemberAccessorDeclaration15.ts(2,12): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/MemberAccessorDeclaration15.ts (2 errors) ==== class C { set Foo(public a: number) { } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt index f8e4561e9a7..15a0e5b4334 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt @@ -1,8 +1,12 @@ +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged + + ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module X.Y { export module Point { ~~~~~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); } } @@ -23,7 +27,7 @@ ==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ==== module A { ~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged export var Instance = new A(); } diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt index 707e0dec513..7c521c8be95 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt @@ -1,8 +1,12 @@ +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged + + ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module A { export module Point { ~~~~~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } } @@ -20,7 +24,7 @@ export module Point { ~~~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt index d87dbe1a163..8f9bfe03ecd 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts(30,16): error TS2339: Property 'A2' does not exist on type 'typeof A'. +tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts(31,17): error TS2339: Property 'A2' does not exist on type 'typeof A'. + + ==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts (2 errors) ==== module A { export class A { @@ -30,9 +34,9 @@ // errors expected, these are not exported var a2 = new A.A2(); ~~ -!!! Property 'A2' does not exist on type 'typeof A'. +!!! error TS2339: Property 'A2' does not exist on type 'typeof A'. var ag2 = new A.A2(); ~~ -!!! Property 'A2' does not exist on type 'typeof A'. +!!! error TS2339: Property 'A2' does not exist on type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt index 59cbd67c916..3484d426d2f 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts(10,11): error TS2339: Property 'Day' does not exist on type 'typeof A'. + + ==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts (1 errors) ==== module A { export enum Color { Red, Blue } @@ -10,5 +13,5 @@ // error not exported var b = A.Day.Monday; ~~~ -!!! Property 'Day' does not exist on type 'typeof A'. +!!! error TS2339: Property 'Day' does not exist on type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt index dc3b4833463..96528577cbc 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts(28,13): error TS2339: Property 'fn2' does not exist on type 'typeof A'. +tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts(29,14): error TS2339: Property 'fng2' does not exist on type 'typeof A'. + + ==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts (2 errors) ==== module A { @@ -28,7 +32,7 @@ // these should be errors since the functions are not exported var fn2 = A.fn2; ~~~ -!!! Property 'fn2' does not exist on type 'typeof A'. +!!! error TS2339: Property 'fn2' does not exist on type 'typeof A'. var fng2 = A.fng2; ~~~~ -!!! Property 'fng2' does not exist on type 'typeof A'. \ No newline at end of file +!!! error TS2339: Property 'fng2' does not exist on type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt index 07233c96782..b6454411858 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts(37,21): error TS2339: Property 'Lines' does not exist on type 'typeof Geometry'. + + ==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts (1 errors) ==== module A { export interface Point { @@ -37,6 +40,6 @@ // not expected to work since non are exported var line = Geometry.Lines.Line; ~~~~~ -!!! Property 'Lines' does not exist on type 'typeof Geometry'. +!!! error TS2339: Property 'Lines' does not exist on type 'typeof Geometry'. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt index 737ec677339..fa4c9e57c08 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts(11,11): error TS2339: Property 'y' does not exist on type 'typeof A'. + + ==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts (1 errors) ==== module A { export var x = 'hello world' @@ -11,5 +14,5 @@ // Error, since y is not exported var y = A.y; ~ -!!! Property 'y' does not exist on type 'typeof A'. +!!! error TS2339: Property 'y' does not exist on type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList13.errors.txt b/tests/baselines/reference/ParameterList13.errors.txt index 63f41b0e230..13bffe4328f 100644 --- a/tests/baselines/reference/ParameterList13.errors.txt +++ b/tests/baselines/reference/ParameterList13.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/ParameterList13.ts(2,10): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/ParameterList13.ts (1 errors) ==== interface I { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList4.errors.txt b/tests/baselines/reference/ParameterList4.errors.txt index e669cbfec68..1d1b0092674 100644 --- a/tests/baselines/reference/ParameterList4.errors.txt +++ b/tests/baselines/reference/ParameterList4.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/ParameterList4.ts(1,12): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/ParameterList4.ts (1 errors) ==== function F(public A) { ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList5.errors.txt b/tests/baselines/reference/ParameterList5.errors.txt index 412fb71eb14..02b86633b95 100644 --- a/tests/baselines/reference/ParameterList5.errors.txt +++ b/tests/baselines/reference/ParameterList5.errors.txt @@ -1,9 +1,14 @@ +tests/cases/compiler/ParameterList5.ts(1,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/compiler/ParameterList5.ts(1,16): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/ParameterList5.ts(1,29): error TS2304: Cannot find name 'C'. + + ==== tests/cases/compiler/ParameterList5.ts (3 errors) ==== function A(): (public B) => C { ~~~~~~~~~~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList6.errors.txt b/tests/baselines/reference/ParameterList6.errors.txt index c7037a3bb9a..b938b7cb52f 100644 --- a/tests/baselines/reference/ParameterList6.errors.txt +++ b/tests/baselines/reference/ParameterList6.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/ParameterList6.ts(2,19): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/ParameterList6.ts (1 errors) ==== class C { constructor(C: (public A) => any) { ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList7.errors.txt b/tests/baselines/reference/ParameterList7.errors.txt index 6179eff50c7..a2b28391a67 100644 --- a/tests/baselines/reference/ParameterList7.errors.txt +++ b/tests/baselines/reference/ParameterList7.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/ParameterList7.ts(2,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/ParameterList7.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/ParameterList7.ts (2 errors) ==== class C1 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private p2:number); // ERROR ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public p3:any) {} // OK } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList8.errors.txt b/tests/baselines/reference/ParameterList8.errors.txt index 950dfaaffa4..f49a1359992 100644 --- a/tests/baselines/reference/ParameterList8.errors.txt +++ b/tests/baselines/reference/ParameterList8.errors.txt @@ -1,12 +1,17 @@ +tests/cases/compiler/ParameterList8.ts(2,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/ParameterList8.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/ParameterList8.ts(4,14): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/ParameterList8.ts (3 errors) ==== declare class C2 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private p2:number); // ERROR ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public p3:any); // ERROR ~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt index 2540e2a071f..fd9c4bc0ffe 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error TS2300: Duplicate identifier 'Point'. +tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(26,26): error TS2300: Duplicate identifier 'Line'. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (2 errors) ==== module A { export class Point { @@ -10,7 +14,7 @@ // expected error export class Point { ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. origin: number; angle: number; } @@ -28,7 +32,7 @@ // expected error export class Line { ~~~~ -!!! Duplicate identifier 'Line'. +!!! error TS2300: Duplicate identifier 'Line'. name: string; } } diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt index 659efa3ecda..8a4962c23c7 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt @@ -1,7 +1,13 @@ +tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(3,24): error TS2304: Cannot find name 'Point'. +tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,36): error TS2304: Cannot find name 'Point'. +tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error TS2304: Cannot find name 'Point'. + + ==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (1 errors) ==== export module A { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export interface Point { x: number; y: number; @@ -21,15 +27,15 @@ // collision with 'Origin' var in other part of merged module export var Origin: Point = { x: 0, y: 0 }; ~~~~~ -!!! Cannot find name 'Point'. +!!! error TS2304: Cannot find name 'Point'. export module Utils { export class Plane { constructor(public tl: Point, public br: Point) { } ~~~~~ -!!! Cannot find name 'Point'. +!!! error TS2304: Cannot find name 'Point'. ~~~~~ -!!! Cannot find name 'Point'. +!!! error TS2304: Cannot find name 'Point'. } } } diff --git a/tests/baselines/reference/TypeArgumentList1.errors.txt b/tests/baselines/reference/TypeArgumentList1.errors.txt index 6c1a300f5a5..4337f520c6d 100644 --- a/tests/baselines/reference/TypeArgumentList1.errors.txt +++ b/tests/baselines/reference/TypeArgumentList1.errors.txt @@ -1,12 +1,19 @@ +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,9): error TS1127: Invalid character. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,1): error TS2304: Cannot find name 'Foo'. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,5): error TS2304: Cannot find name 'A'. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,7): error TS2304: Cannot find name 'B'. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,11): error TS2304: Cannot find name 'C'. + + ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts (5 errors) ==== Foo(4, 5, 6); -!!! Invalid character. +!!! error TS1127: Invalid character. ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. ~ -!!! Cannot find name 'C'. \ No newline at end of file +!!! error TS2304: Cannot find name 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt b/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt index df4fe1ecf9e..401a0107d89 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt @@ -1,14 +1,20 @@ +tests/cases/compiler/accessorParameterAccessibilityModifier.ts(3,9): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/accessorParameterAccessibilityModifier.ts(4,16): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/accessorParameterAccessibilityModifier.ts(3,11): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/accessorParameterAccessibilityModifier.ts(4,18): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/accessorParameterAccessibilityModifier.ts (4 errors) ==== class C { set X(public v) { } ~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. static set X(public v2) { } ~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithES3.errors.txt b/tests/baselines/reference/accessorWithES3.errors.txt index a16d23d28c2..0b4510a12ca 100644 --- a/tests/baselines/reference/accessorWithES3.errors.txt +++ b/tests/baselines/reference/accessorWithES3.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(16,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(20,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts (4 errors) ==== // error to use accessors in ES3 mode @@ -5,7 +11,7 @@ class C { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } } @@ -13,18 +19,18 @@ class D { set x(v) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } var x = { get a() { return 1 } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var y = { set b(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithInitializer.errors.txt b/tests/baselines/reference/accessorWithInitializer.errors.txt index 127bfdc8d82..338d9559e4c 100644 --- a/tests/baselines/reference/accessorWithInitializer.errors.txt +++ b/tests/baselines/reference/accessorWithInitializer.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/accessorWithInitializer.ts(3,9): error TS1052: A 'set' accessor parameter cannot have an initializer. +tests/cases/compiler/accessorWithInitializer.ts(4,16): error TS1052: A 'set' accessor parameter cannot have an initializer. + + ==== tests/cases/compiler/accessorWithInitializer.ts (2 errors) ==== class C { set X(v = 0) { } ~ -!!! A 'set' accessor parameter cannot have an initializer. +!!! error TS1052: A 'set' accessor parameter cannot have an initializer. static set X(v2 = 0) { } ~ -!!! A 'set' accessor parameter cannot have an initializer. +!!! error TS1052: A 'set' accessor parameter cannot have an initializer. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithRestParam.errors.txt b/tests/baselines/reference/accessorWithRestParam.errors.txt index 10f4633805f..6162d5a8238 100644 --- a/tests/baselines/reference/accessorWithRestParam.errors.txt +++ b/tests/baselines/reference/accessorWithRestParam.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/accessorWithRestParam.ts(3,9): error TS1053: A 'set' accessor cannot have rest parameter. +tests/cases/compiler/accessorWithRestParam.ts(4,16): error TS1053: A 'set' accessor cannot have rest parameter. + + ==== tests/cases/compiler/accessorWithRestParam.ts (2 errors) ==== class C { set X(...v) { } ~ -!!! A 'set' accessor cannot have rest parameter. +!!! error TS1053: A 'set' accessor cannot have rest parameter. static set X(...v2) { } ~ -!!! A 'set' accessor cannot have rest parameter. +!!! error TS1053: A 'set' accessor cannot have rest parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt b/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt index b108ea940a3..725ad30bd61 100644 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt @@ -1,15 +1,19 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts (2 errors) ==== // accessors are not contextually typed class C { set x(v: (a: string) => string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return (x: string) => ""; } } diff --git a/tests/baselines/reference/accessorsEmit.errors.txt b/tests/baselines/reference/accessorsEmit.errors.txt index 54bfafec648..4d620f8cd8b 100644 --- a/tests/baselines/reference/accessorsEmit.errors.txt +++ b/tests/baselines/reference/accessorsEmit.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/accessorsEmit.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessorsEmit.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/accessorsEmit.ts (2 errors) ==== class Result { } class Test { get Property(): Result { ~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = 1; return null; } @@ -13,7 +17,7 @@ class Test2 { get Property() { ~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = 1; return null; } diff --git a/tests/baselines/reference/accessorsInAmbientContext.errors.txt b/tests/baselines/reference/accessorsInAmbientContext.errors.txt index fe7dfb361f9..ada59f21f65 100644 --- a/tests/baselines/reference/accessorsInAmbientContext.errors.txt +++ b/tests/baselines/reference/accessorsInAmbientContext.errors.txt @@ -1,35 +1,45 @@ +tests/cases/compiler/accessorsInAmbientContext.ts(4,13): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/compiler/accessorsInAmbientContext.ts(5,13): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/compiler/accessorsInAmbientContext.ts(7,20): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/compiler/accessorsInAmbientContext.ts(8,20): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/compiler/accessorsInAmbientContext.ts(13,9): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/compiler/accessorsInAmbientContext.ts(14,9): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/compiler/accessorsInAmbientContext.ts(16,16): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/compiler/accessorsInAmbientContext.ts(17,16): error TS1086: An accessor cannot be declared in an ambient context. + + ==== tests/cases/compiler/accessorsInAmbientContext.ts (8 errors) ==== declare module M { class C { get X() { return 1; } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. set X(v) { } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. static get Y() { return 1; } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. static set Y(v) { } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. } } declare class C { get X() { return 1; } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. set X(v) { } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. static get Y() { return 1; } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. static set Y(v) { } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt b/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt index 3233ba9b5ee..f7d7b146ee3 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt +++ b/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/accessorsNotAllowedInES3.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessorsNotAllowedInES3.ts(5,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/accessorsNotAllowedInES3.ts (2 errors) ==== class C { get x(): number { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var y = { get foo() { return 3; } }; ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt index be2d5d10ef3..a3e8acd7d17 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt @@ -1,38 +1,52 @@ +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,55): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,54): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,52): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2323: Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts (12 errors) ==== class LanguageSpec_section_4_5_error_cases { public set AnnotatedSetter_SetterFirst(a: number) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get AnnotatedSetter_SetterFirst() { return ""; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. public get AnnotatedSetter_SetterLast() { return ""; } ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. public set AnnotatedSetter_SetterLast(a: number) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get AnnotatedGetter_GetterFirst(): string { return ""; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set AnnotatedGetter_GetterFirst(aStr) { aStr = 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. public set AnnotatedGetter_GetterLast(aStr) { aStr = 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. public get AnnotatedGetter_GetterLast(): string { return ""; } ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt b/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt index 6f30cec38e4..9e7db776ff5 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt @@ -1,3 +1,17 @@ +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(13,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(16,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(17,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(20,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(22,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/accessors_spec_section-4.5_inference.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/accessors_spec_section-4.5_inference.ts (12 errors) ==== class A { } class B extends A { } @@ -6,44 +20,44 @@ public set InferredGetterFromSetterAnnotation(a: A) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredGetterFromSetterAnnotation() { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredGetterFromSetterAnnotation_GetterFirst() { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredGetterFromSetterAnnotation_GetterFirst(a: A) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredFromGetter() { return new B(); } ~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredFromGetter(a) { } ~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredFromGetter_SetterFirst(a) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredFromGetter_SetterFirst() { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredSetterFromGetterAnnotation(a) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredSetterFromGetterAnnotation() : A { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredSetterFromGetterAnnotation_GetterFirst() : A { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredSetterFromGetterAnnotation_GetterFirst(a) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt index 36b45612631..6fca82a677f 100644 --- a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt +++ b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2429: Interface 'Bar' incorrectly extends interface 'Foo': + Types of property 'f' are incompatible: + Type '(key: string) => string' is not assignable to type '() => string'. + + ==== tests/cases/compiler/addMoreOverloadsToBaseSignature.ts (1 errors) ==== interface Foo { f(): string; @@ -5,9 +10,9 @@ interface Bar extends Foo { ~~~ -!!! Interface 'Bar' incorrectly extends interface 'Foo': -!!! Types of property 'f' are incompatible: -!!! Type '(key: string) => string' is not assignable to type '() => string'. +!!! error TS2429: Interface 'Bar' incorrectly extends interface 'Foo': +!!! error TS2429: Types of property 'f' are incompatible: +!!! error TS2429: Type '(key: string) => string' is not assignable to type '() => string'. f(key: string): string; } \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt index 607a76b1034..bd71b64b501 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt @@ -1,3 +1,24 @@ +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(17,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(22,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(25,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(26,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'number'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(27,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(30,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(31,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(32,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(33,11): error TS2365: Operator '+' cannot be applied to types '{}' and '{}'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(34,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'Number'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(35,11): error TS2365: Operator '+' cannot be applied to types 'number' and '() => void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(36,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(37,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'typeof C'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(38,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'C'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(39,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(40,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'typeof M'. + + ==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts (19 errors) ==== function foo() { } class C { @@ -15,65 +36,65 @@ // boolean + every type except any and string var r1 = a + a; ~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r2 = a + b; ~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. var r3 = a + c; ~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'Object'. // number + every type except any and string var r4 = b + a; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. var r5 = b + b; // number + number is valid var r6 = b + c; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'Object'. // object + every type except any and string var r7 = c + a; ~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'boolean'. var r8 = c + b; ~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'number'. var r9 = c + c; ~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. // other cases var r10 = a + true; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r11 = true + false; ~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r12 = true + 123; ~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. var r13 = {} + {}; ~~~~~~~ -!!! Operator '+' cannot be applied to types '{}' and '{}'. +!!! error TS2365: Operator '+' cannot be applied to types '{}' and '{}'. var r14 = b + d; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'Number'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'Number'. var r15 = b + foo; ~~~~~~~ -!!! Operator '+' cannot be applied to types 'number' and '() => void'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and '() => void'. var r16 = b + foo(); ~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'void'. var r17 = b + C; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'typeof C'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'typeof C'. var r18 = E.a + new C(); ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'E' and 'C'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'C'. var r19 = E.a + C.foo(); ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'void'. var r20 = E.a + M; ~~~~~~~ -!!! Operator '+' cannot be applied to types 'E' and 'typeof M'. \ No newline at end of file +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'typeof M'. \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt index 230210c2586..566fb241bf8 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt @@ -1,3 +1,16 @@ +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(11,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(12,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(13,10): error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(14,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(21,10): error TS2365: Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(23,11): error TS2365: Operator '+' cannot be applied to types '() => void' and '() => void'. + + ==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts (11 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the other operand. @@ -11,36 +24,36 @@ // null + boolean/Object var r1 = null + a; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r2 = null + b; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. var r3 = null + c; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. var r4 = a + null; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r5 = b + null; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. var r6 = null + c; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. // other cases var r7 = null + d; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Number' and 'Number'. +!!! error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. var r8 = null + true; ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r9 = null + { a: '' }; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. +!!! error TS2365: Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. var r10 = null + foo(); ~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. var r11 = null + (() => { }); ~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types '() => void' and '() => void'. \ No newline at end of file +!!! error TS2365: Operator '+' cannot be applied to types '() => void' and '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt index fad515948be..9e7e4c01ad2 100644 --- a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt +++ b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -1,14 +1,20 @@ +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts(2,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts(3,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts(4,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts(5,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. + + ==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts (4 errors) ==== // bug 819721 var r1 = null + null; ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var r2 = null + undefined; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var r3 = undefined + null; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var r4 = undefined + undefined; ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. \ No newline at end of file +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt index 5b084477241..ff7120c145d 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt @@ -1,3 +1,21 @@ +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(15,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(16,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(18,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(19,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(20,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(24,14): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(25,15): error TS2365: Operator '+' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(27,15): error TS2365: Operator '+' cannot be applied to types 'Object' and 'T'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(28,15): error TS2365: Operator '+' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(29,15): error TS2365: Operator '+' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(32,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(33,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(34,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(35,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(36,15): error TS2365: Operator '+' cannot be applied to types 'T' and '() => void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(37,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'undefined[]'. + + ==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts (16 errors) ==== // type parameter type is not a valid operand of addition operator enum E { a, b } @@ -15,57 +33,57 @@ var r1: any = t + a; // ok, one operand is any var r2 = t + b; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'boolean'. var r3 = t + c; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'number'. var r4 = t + d; // ok, one operand is string var r5 = t + e; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'Object'. var r6 = t + g; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'E'. var r7 = t + f; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'void'. // type parameter as right operand var r8 = a + t; // ok, one operand is any var r9 = b + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'T'. var r10 = c + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'T'. var r11 = d + t; // ok, one operand is string var r12 = e + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'T'. var r13 = g + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'T'. var r14 = f + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'T'. // other cases var r15 = t + null; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. var r16 = t + undefined; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. var r17 = t + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. var r18 = t + u; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'U'. var r19 = t + (() => { }); ~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'T' and '() => void'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and '() => void'. var r20 = t + []; ~~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'undefined[]'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'undefined[]'. } \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt index 95b1f4055a7..36233e9e9fe 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -1,3 +1,16 @@ +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(11,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(12,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(13,10): error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(14,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(21,10): error TS2365: Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(23,11): error TS2365: Operator '+' cannot be applied to types '() => void' and '() => void'. + + ==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts (11 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the other operand. @@ -11,36 +24,36 @@ // undefined + boolean/Object var r1 = undefined + a; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r2 = undefined + b; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. var r3 = undefined + c; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. var r4 = a + undefined; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r5 = b + undefined; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. var r6 = undefined + c; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. // other cases var r7 = undefined + d; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Number' and 'Number'. +!!! error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. var r8 = undefined + true; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r9 = undefined + { a: '' }; ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. +!!! error TS2365: Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. var r10 = undefined + foo(); ~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. var r11 = undefined + (() => { }); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types '() => void' and '() => void'. \ No newline at end of file +!!! error TS2365: Operator '+' cannot be applied to types '() => void' and '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/aliasAssignments.errors.txt b/tests/baselines/reference/aliasAssignments.errors.txt index d75b8d51451..1c49a377356 100644 --- a/tests/baselines/reference/aliasAssignments.errors.txt +++ b/tests/baselines/reference/aliasAssignments.errors.txt @@ -1,14 +1,19 @@ +tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"': + Property 'someClass' is missing in type 'Number'. +tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'. + + ==== tests/cases/compiler/aliasAssignments_1.ts (2 errors) ==== import moduleA = require("aliasAssignments_moduleA"); var x = moduleA; x = 1; // Should be error ~ -!!! Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"': -!!! Property 'someClass' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"': +!!! error TS2322: Property 'someClass' is missing in type 'Number'. var y = 1; y = moduleA; // should be error ~ -!!! Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'. +!!! error TS2323: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'. ==== tests/cases/compiler/aliasAssignments_moduleA.ts (0 errors) ==== export class someClass { diff --git a/tests/baselines/reference/aliasBug.errors.txt b/tests/baselines/reference/aliasBug.errors.txt index 1e7434c19b6..92b63e41b68 100644 --- a/tests/baselines/reference/aliasBug.errors.txt +++ b/tests/baselines/reference/aliasBug.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/aliasBug.ts(17,10): error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. + + ==== tests/cases/compiler/aliasBug.ts (1 errors) ==== module foo { @@ -17,7 +20,7 @@ var p2: foo.Provide; var p3:booz.bar; ~~~~~~~~ -!!! Module 'foo.bar.baz' has no exported member 'bar'. +!!! error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. var p22 = new provide.Provide(); } \ No newline at end of file diff --git a/tests/baselines/reference/aliasErrors.errors.txt b/tests/baselines/reference/aliasErrors.errors.txt index 4407771ce56..20e68c5f800 100644 --- a/tests/baselines/reference/aliasErrors.errors.txt +++ b/tests/baselines/reference/aliasErrors.errors.txt @@ -1,3 +1,12 @@ +tests/cases/compiler/aliasErrors.ts(13,12): error TS1003: Identifier expected. +tests/cases/compiler/aliasErrors.ts(14,12): error TS1003: Identifier expected. +tests/cases/compiler/aliasErrors.ts(15,12): error TS1003: Identifier expected. +tests/cases/compiler/aliasErrors.ts(11,1): error TS2304: Cannot find name 'no'. +tests/cases/compiler/aliasErrors.ts(12,1): error TS2304: Cannot find name 'no'. +tests/cases/compiler/aliasErrors.ts(16,1): error TS2304: Cannot find name 'undefined'. +tests/cases/compiler/aliasErrors.ts(26,10): error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. + + ==== tests/cases/compiler/aliasErrors.ts (7 errors) ==== module foo { export class Provide { @@ -11,22 +20,22 @@ import m = no; ~~~~~~~~~~~~~~ -!!! Cannot find name 'no'. +!!! error TS2304: Cannot find name 'no'. import m2 = no.mod; ~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'no'. +!!! error TS2304: Cannot find name 'no'. import n = 5; ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. import o = "s"; ~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. import q = null; ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. import r = undefined; ~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'undefined'. +!!! error TS2304: Cannot find name 'undefined'. var p = new provide.Provide(); @@ -38,7 +47,7 @@ var p2: foo.Provide; var p3:booz.bar; ~~~~~~~~ -!!! Module 'foo.bar.baz' has no exported member 'bar'. +!!! error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. var p22 = new provide.Provide(); } diff --git a/tests/baselines/reference/aliasInaccessibleModule.errors.txt b/tests/baselines/reference/aliasInaccessibleModule.errors.txt index 839ea965b02..9967979442a 100644 --- a/tests/baselines/reference/aliasInaccessibleModule.errors.txt +++ b/tests/baselines/reference/aliasInaccessibleModule.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/aliasInaccessibleModule.ts(4,5): error TS4000: Import declaration 'X' is using private name 'N'. + + ==== tests/cases/compiler/aliasInaccessibleModule.ts (1 errors) ==== module M { module N { } export import X = N; ~~~~~~~~~~~~~~~~~~~~ -!!! Import declaration 'X' is using private name 'N'. +!!! error TS4000: Import declaration 'X' is using private name 'N'. } \ No newline at end of file diff --git a/tests/baselines/reference/aliasInaccessibleModule2.errors.txt b/tests/baselines/reference/aliasInaccessibleModule2.errors.txt index 149410acb10..ffeb4ff86dd 100644 --- a/tests/baselines/reference/aliasInaccessibleModule2.errors.txt +++ b/tests/baselines/reference/aliasInaccessibleModule2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/aliasInaccessibleModule2.ts(7,5): error TS4000: Import declaration 'R' is using private name 'N'. + + ==== tests/cases/compiler/aliasInaccessibleModule2.ts (1 errors) ==== module M { module N { @@ -7,6 +10,6 @@ } import R = N; ~~~~~~~~~~~~~ -!!! Import declaration 'R' is using private name 'N'. +!!! error TS4000: Import declaration 'R' is using private name 'N'. export import X = R; } \ No newline at end of file diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt b/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt index 8736a2e7ae7..009d405c0f5 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/aliasOnMergedModuleInterface_1.ts(5,16): error TS2304: Cannot find name 'foo'. + + ==== tests/cases/compiler/aliasOnMergedModuleInterface_1.ts (1 errors) ==== /// import foo = require("foo") @@ -5,7 +8,7 @@ z.bar("hello"); // This should be ok var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be error ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. ==== tests/cases/compiler/aliasOnMergedModuleInterface_0.ts (0 errors) ==== declare module "foo" diff --git a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt index 3185336f8f7..a2532be9344 100644 --- a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt +++ b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts(2,9): error TS2304: Cannot find name 'b'. + + ==== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts (1 errors) ==== import moduleA = require("aliasWithInterfaceExportAssignmentUsedInVarInitializer_0"); var d = b.q3; ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ==== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts (0 errors) ==== interface c { q3: number; diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt b/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt index ed00c2a4a16..e7ace55872a 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt +++ b/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/ambientClassOverloadForFunction.ts(2,10): error TS2300: Duplicate identifier 'foo'. + + ==== tests/cases/compiler/ambientClassOverloadForFunction.ts (1 errors) ==== declare class foo{}; function foo() { return null; } ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/ambientDeclarationsExternal.errors.txt b/tests/baselines/reference/ambientDeclarationsExternal.errors.txt index 94b3c770d60..124bf928699 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.errors.txt +++ b/tests/baselines/reference/ambientDeclarationsExternal.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/ambient/consumer.ts (1 errors) ==== /// import imp1 = require('equ'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. // Ambient external module members are always exported with or without export keyword when module lacks export assignment diff --git a/tests/baselines/reference/ambientEnumElementInitializer3.errors.txt b/tests/baselines/reference/ambientEnumElementInitializer3.errors.txt index 159204675e9..56058210c16 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer3.errors.txt +++ b/tests/baselines/reference/ambientEnumElementInitializer3.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/ambientEnumElementInitializer3.ts(2,2): error TS1066: Ambient enum elements can only have integer literal initializers. + + ==== tests/cases/compiler/ambientEnumElementInitializer3.ts (1 errors) ==== declare enum E { e = 3.3 // Decimal ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientErrors.errors.txt b/tests/baselines/reference/ambientErrors.errors.txt index 146f9322100..975dc9ad63a 100644 --- a/tests/baselines/reference/ambientErrors.errors.txt +++ b/tests/baselines/reference/ambientErrors.errors.txt @@ -1,14 +1,32 @@ +tests/cases/conformance/ambient/ambientErrors.ts(2,15): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/conformance/ambient/ambientErrors.ts(24,5): error TS1066: Ambient enum elements can only have integer literal initializers. +tests/cases/conformance/ambient/ambientErrors.ts(29,5): error TS1066: Ambient enum elements can only have integer literal initializers. +tests/cases/conformance/ambient/ambientErrors.ts(34,11): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/ambient/ambientErrors.ts(35,19): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/conformance/ambient/ambientErrors.ts(37,18): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/ambient/ambientErrors.ts(38,11): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/conformance/ambient/ambientErrors.ts(40,14): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/conformance/ambient/ambientErrors.ts(41,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/conformance/ambient/ambientErrors.ts(6,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/ambient/ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/ambient/ambientErrors.ts(47,20): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient external module declaration cannot specify relative module name. +tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/conformance/ambient/ambientErrors.ts (16 errors) ==== // Ambient variable with an initializer declare var x = 4; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. // Ambient functions with invalid overloads declare function fn(x: number): string; declare function fn(x: 'foo'): number; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. // Ambient functions with duplicate signatures declare function fn1(x: number): string; @@ -21,51 +39,51 @@ // Ambient function with default parameter values declare function fn3(x = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. // Ambient function with function body declare function fn4() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. // Ambient enum with non - integer literal constant member declare enum E1 { y = 4.23 ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. } // Ambient enum with computer member declare enum E2 { x = 'foo'.length ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. } // Ambient module with initializers for values, bodies for functions / classes declare module M1 { var x = 3; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. function fn() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. class C { static x = 3; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. y = 4; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. constructor() { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. fn() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static sfn() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. } } @@ -73,13 +91,13 @@ module M2 { declare module 'nope' { } ~~~~~~ -!!! Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient external modules cannot be nested in other modules. } // Ambient external module with a string literal name that isn't a top level external module name declare module '../foo' { } ~~~~~~~~ -!!! Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient external module declaration cannot specify relative module name. // Ambient external module with export assignment and other exported members declare module 'bar' { @@ -87,6 +105,6 @@ export var q; export = n; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index d5fd7ed2296..fb988131df0 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): error TS2307: Cannot find external module 'ext'. + + ==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ==== class D { } @@ -5,12 +9,12 @@ declare module "ext" { ~~~~~ -!!! Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient external modules cannot be nested in other modules. export class C { } } // Cannot resolve this ext module reference import ext = require("ext"); ~~~~~ -!!! Cannot find external module 'ext'. +!!! error TS2307: Cannot find external module 'ext'. var x = ext; \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt index ca8ceb6d3ec..e23f96803ba 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt @@ -1,6 +1,9 @@ +tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient external modules cannot be nested in other modules. + + ==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts (1 errors) ==== module M { export declare module "M" { } ~~~ -!!! Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient external modules cannot be nested in other modules. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt index 44731cf6250..92f01832926 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt @@ -1,4 +1,7 @@ +tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2435: Ambient external modules cannot be nested in other modules. + + ==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (1 errors) ==== export declare module "M" { } ~~~ -!!! Ambient external modules cannot be nested in other modules. \ No newline at end of file +!!! error TS2435: Ambient external modules cannot be nested in other modules. \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt index 2f4779ebfac..4ebae64b0b8 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import declaration in an ambient external module declaration cannot reference external module through relative external module name. +tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find external module './SubModule'. + + ==== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts (2 errors) ==== declare module "OuterModule" { import m2 = require("./SubModule"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Import declaration in an ambient external module declaration cannot reference external module through relative external module name. +!!! error TS2439: Import declaration in an ambient external module declaration cannot reference external module through relative external module name. ~~~~~~~~~~~~~ -!!! Cannot find external module './SubModule'. +!!! error TS2307: Cannot find external module './SubModule'. class SubModule { public static StaticVar: number; public InstanceVar: number; diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt index fba44282cc3..7f6c0ff5b14 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(1,16): error TS2436: Ambient external module declaration cannot specify relative module name. +tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(5,16): error TS2436: Ambient external module declaration cannot specify relative module name. + + ==== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts (2 errors) ==== declare module "./relativeModule" { ~~~~~~~~~~~~~~~~~~ -!!! Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient external module declaration cannot specify relative module name. var x: string; } declare module ".\\relativeModule" { ~~~~~~~~~~~~~~~~~~~ -!!! Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient external module declaration cannot specify relative module name. var x: string; } \ No newline at end of file diff --git a/tests/baselines/reference/ambientGetters.errors.txt b/tests/baselines/reference/ambientGetters.errors.txt index a01c146d977..a56020c41fb 100644 --- a/tests/baselines/reference/ambientGetters.errors.txt +++ b/tests/baselines/reference/ambientGetters.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/ambientGetters.ts(3,9): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/compiler/ambientGetters.ts(7,9): error TS1086: An accessor cannot be declared in an ambient context. + + ==== tests/cases/compiler/ambientGetters.ts (2 errors) ==== declare class A { get length() : number; ~~~~~~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. } declare class B { get length() { return 0; } ~~~~~~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientWithStatements.errors.txt b/tests/baselines/reference/ambientWithStatements.errors.txt index 9f0927d0765..4eef608bbec 100644 --- a/tests/baselines/reference/ambientWithStatements.errors.txt +++ b/tests/baselines/reference/ambientWithStatements.errors.txt @@ -1,38 +1,55 @@ +tests/cases/compiler/ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(3,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(4,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(5,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(7,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(8,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(9,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(10,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(11,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(12,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(18,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(19,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(25,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(7,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/compiler/ambientWithStatements.ts(25,11): error TS2410: All symbols within a 'with' block will be resolved to 'any'. + + ==== tests/cases/compiler/ambientWithStatements.ts (15 errors) ==== declare module M { break; ~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. continue; ~~~~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. debugger; ~~~~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. do { } while (true); ~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. var x; for (x in null) { } ~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. ~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. if (true) { } else { } ~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. 1; ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. L: var y; ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. return; ~~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. switch (x) { ~~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. case 1: break; default: @@ -40,10 +57,10 @@ } throw "nooo"; ~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. try { ~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. } catch (e) { } @@ -51,8 +68,8 @@ } with (x) { ~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. ~ -!!! All symbols within a 'with' block will be resolved to 'any'. +!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt b/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt index 5547ccb63f7..d97cdc95ac8 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt +++ b/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt @@ -1,16 +1,23 @@ +tests/cases/compiler/ambiguousGenericAssertion1.ts(4,10): error TS1109: Expression expected. +tests/cases/compiler/ambiguousGenericAssertion1.ts(4,16): error TS1005: ')' expected. +tests/cases/compiler/ambiguousGenericAssertion1.ts(4,19): error TS1005: ',' expected. +tests/cases/compiler/ambiguousGenericAssertion1.ts(4,21): error TS1005: ';' expected. +tests/cases/compiler/ambiguousGenericAssertion1.ts(4,15): error TS2304: Cannot find name 'x'. + + ==== tests/cases/compiler/ambiguousGenericAssertion1.ts (5 errors) ==== function f(x: T): T { return null; } var r = (x: T) => x; var r2 = < (x: T) => T>f; // valid var r3 = <(x: T) => T>f; // ambiguous, appears to the parser as a << operation ~~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~ -!!! ')' expected. +!!! error TS1005: ')' expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/ambiguousOverload.errors.txt b/tests/baselines/reference/ambiguousOverload.errors.txt index 90e973ffba4..93d2fe848cc 100644 --- a/tests/baselines/reference/ambiguousOverload.errors.txt +++ b/tests/baselines/reference/ambiguousOverload.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/ambiguousOverload.ts(5,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/ambiguousOverload.ts (2 errors) ==== function foof(bar: string, y): number; function foof(bar: string, x): string; @@ -5,7 +9,7 @@ var x: number = foof("s", null); var y: string = foof("s", null); ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. function foof2(bar: string, x): string; function foof2(bar: string, y): number; @@ -13,4 +17,4 @@ var x2: string = foof2("s", null); var y2: number = foof2("s", null); ~~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyComment1.errors.txt b/tests/baselines/reference/amdDependencyComment1.errors.txt index 97ce60ff1b8..8e436a56547 100644 --- a/tests/baselines/reference/amdDependencyComment1.errors.txt +++ b/tests/baselines/reference/amdDependencyComment1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find external module 'm2'. + + ==== tests/cases/compiler/amdDependencyComment1.ts (1 errors) ==== /// import m1 = require("m2") ~~~~ -!!! Cannot find external module 'm2'. +!!! error TS2307: Cannot find external module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyComment2.errors.txt b/tests/baselines/reference/amdDependencyComment2.errors.txt index edab2e9c955..bddd4e334e6 100644 --- a/tests/baselines/reference/amdDependencyComment2.errors.txt +++ b/tests/baselines/reference/amdDependencyComment2.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find external module 'm2'. + + ==== tests/cases/compiler/amdDependencyComment2.ts (1 errors) ==== /// import m1 = require("m2") ~~~~ -!!! Cannot find external module 'm2'. +!!! error TS2307: Cannot find external module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/anonymousModules.errors.txt b/tests/baselines/reference/anonymousModules.errors.txt index b50f7591968..43b3d544a8b 100644 --- a/tests/baselines/reference/anonymousModules.errors.txt +++ b/tests/baselines/reference/anonymousModules.errors.txt @@ -1,40 +1,55 @@ +tests/cases/compiler/anonymousModules.ts(1,8): error TS1005: ';' expected. +tests/cases/compiler/anonymousModules.ts(2,2): error TS1129: Statement expected. +tests/cases/compiler/anonymousModules.ts(2,2): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/anonymousModules.ts(4,9): error TS1005: ';' expected. +tests/cases/compiler/anonymousModules.ts(5,3): error TS1129: Statement expected. +tests/cases/compiler/anonymousModules.ts(6,2): error TS1128: Declaration or statement expected. +tests/cases/compiler/anonymousModules.ts(10,9): error TS1005: ';' expected. +tests/cases/compiler/anonymousModules.ts(13,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/anonymousModules.ts(1,1): error TS2304: Cannot find name 'module'. +tests/cases/compiler/anonymousModules.ts(4,2): error TS2304: Cannot find name 'module'. +tests/cases/compiler/anonymousModules.ts(5,14): error TS2395: Individual declarations in merged declaration bar must be all exported or all local. +tests/cases/compiler/anonymousModules.ts(8,6): error TS2395: Individual declarations in merged declaration bar must be all exported or all local. +tests/cases/compiler/anonymousModules.ts(10,2): error TS2304: Cannot find name 'module'. + + ==== tests/cases/compiler/anonymousModules.ts (13 errors) ==== module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. export var foo = 1; ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. export var bar = 1; ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~~ -!!! Individual declarations in merged declaration bar must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration bar must be all exported or all local. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var bar = 2; ~~~ -!!! Individual declarations in merged declaration bar must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration bar must be all exported or all local. module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. var x = bar; } } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/anyAsConstructor.errors.txt b/tests/baselines/reference/anyAsConstructor.errors.txt index ffd31da4045..147d7957906 100644 --- a/tests/baselines/reference/anyAsConstructor.errors.txt +++ b/tests/baselines/reference/anyAsConstructor.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/any/anyAsConstructor.ts(10,9): error TS2347: Untyped function calls may not accept type arguments. + + ==== tests/cases/conformance/types/any/anyAsConstructor.ts (1 errors) ==== // any is considered an untyped function call // can be called except with type arguments which is an error @@ -10,4 +13,4 @@ // grammar allows this for constructors var d = new x(x); // no error ~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. \ No newline at end of file +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt b/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt index 7fbe17d0e18..9dbee62e079 100644 --- a/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt +++ b/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts(5,9): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts(6,9): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts(9,9): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts(10,9): error TS2347: Untyped function calls may not accept type arguments. + + ==== tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts (4 errors) ==== // any is considered an untyped function call // can be called except with type arguments which is an error @@ -5,15 +11,15 @@ var x: any; var a = x(); ~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. var b = x('hello'); ~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. class C { foo: string; } var c = x(x); ~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. var d = x(x); ~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. \ No newline at end of file +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/anyAssignableToEveryType2.errors.txt b/tests/baselines/reference/anyAssignableToEveryType2.errors.txt index 927fe3c6274..e5f9a07476e 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.errors.txt +++ b/tests/baselines/reference/anyAssignableToEveryType2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts(114,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts (1 errors) ==== // any is not a subtype of any other types, but is assignable, all the below should work @@ -114,7 +117,7 @@ interface I18 { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. [x: string]: U; foo: any; } diff --git a/tests/baselines/reference/anyDeclare.errors.txt b/tests/baselines/reference/anyDeclare.errors.txt index 0bb771b6d91..c9728323818 100644 --- a/tests/baselines/reference/anyDeclare.errors.txt +++ b/tests/baselines/reference/anyDeclare.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/anyDeclare.ts(4,14): error TS2300: Duplicate identifier 'myFn'. + + ==== tests/cases/compiler/anyDeclare.ts (1 errors) ==== declare var x: any; module myMod { var myFn; function myFn() { } ~~~~ -!!! Duplicate identifier 'myFn'. +!!! error TS2300: Duplicate identifier 'myFn'. } \ No newline at end of file diff --git a/tests/baselines/reference/anyIdenticalToItself.errors.txt b/tests/baselines/reference/anyIdenticalToItself.errors.txt index 36c31825cb9..ea8583a6a75 100644 --- a/tests/baselines/reference/anyIdenticalToItself.errors.txt +++ b/tests/baselines/reference/anyIdenticalToItself.errors.txt @@ -1,19 +1,24 @@ +tests/cases/compiler/anyIdenticalToItself.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/anyIdenticalToItself.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/anyIdenticalToItself.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/anyIdenticalToItself.ts (3 errors) ==== function foo(x: any); ~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(x: any); function foo(x: any, y: number) { } class C { get X(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y: any; return y; } set X(v: any) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/apparentTypeSubtyping.errors.txt b/tests/baselines/reference/apparentTypeSubtyping.errors.txt index f5725bd07ff..a9a97c22722 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.errors.txt +++ b/tests/baselines/reference/apparentTypeSubtyping.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(9,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': + Types of property 'x' are incompatible: + Type 'String' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts (1 errors) ==== // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: @@ -9,9 +14,9 @@ // is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T) class Derived extends Base { // error ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Types of property 'x' are incompatible: -!!! Type 'String' is not assignable to type 'string'. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type 'String' is not assignable to type 'string'. x: String; } diff --git a/tests/baselines/reference/apparentTypeSupertype.errors.txt b/tests/baselines/reference/apparentTypeSupertype.errors.txt index a2442d71222..78c667541d6 100644 --- a/tests/baselines/reference/apparentTypeSupertype.errors.txt +++ b/tests/baselines/reference/apparentTypeSupertype.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(9,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': + Types of property 'x' are incompatible: + Type 'U' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts (1 errors) ==== // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: @@ -9,8 +14,8 @@ // is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T) class Derived extends Base { // error ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Types of property 'x' are incompatible: -!!! Type 'U' is not assignable to type 'string'. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type 'U' is not assignable to type 'string'. x: U; } \ No newline at end of file diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt index b894b6193eb..9d5847a77b0 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts (1 errors) ==== var arguments = 10; function foo(a) { arguments = 10; /// This shouldnt be of type number and result in error. ~~~~~~~~~ -!!! Type 'number' is not assignable to type 'IArguments': -!!! Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'IArguments': +!!! error TS2322: Property 'length' is missing in type 'Number'. } \ No newline at end of file diff --git a/tests/baselines/reference/arithAssignTyping.errors.txt b/tests/baselines/reference/arithAssignTyping.errors.txt index cdeaf948293..c4cd84639a6 100644 --- a/tests/baselines/reference/arithAssignTyping.errors.txt +++ b/tests/baselines/reference/arithAssignTyping.errors.txt @@ -1,39 +1,53 @@ +tests/cases/compiler/arithAssignTyping.ts(3,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/compiler/arithAssignTyping.ts(4,1): error TS2365: Operator '+=' cannot be applied to types 'typeof f' and 'number'. +tests/cases/compiler/arithAssignTyping.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(9,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(10,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(12,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(13,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithAssignTyping.ts(14,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/arithAssignTyping.ts (12 errors) ==== class f { } f += ''; // error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. f += 1; // error ~~~~~~ -!!! Operator '+=' cannot be applied to types 'typeof f' and 'number'. +!!! error TS2365: Operator '+=' cannot be applied to types 'typeof f' and 'number'. f -= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f *= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f /= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f %= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f &= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f |= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f <<= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f >>= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f >>>= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f ^= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt b/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt index caa8c959d6f..2c042af6f86 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt +++ b/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt @@ -1,21 +1,30 @@ +tests/cases/compiler/arithmeticOnInvalidTypes.ts(3,9): error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. +tests/cases/compiler/arithmeticOnInvalidTypes.ts(4,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes.ts(4,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes.ts(5,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes.ts(5,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes.ts(6,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes.ts(6,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/arithmeticOnInvalidTypes.ts (7 errors) ==== var x: Number; var y: Number; var z = x + y; ~~~~~ -!!! Operator '+' cannot be applied to types 'Number' and 'Number'. +!!! error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. var z2 = x - y; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var z3 = x * y; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var z4 = x / y; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt b/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt index 5cb6824846d..d5b74e5abc7 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt +++ b/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt @@ -1,22 +1,31 @@ +tests/cases/compiler/arithmeticOnInvalidTypes2.ts(2,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. +tests/cases/compiler/arithmeticOnInvalidTypes2.ts(3,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes2.ts(3,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes2.ts(4,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes2.ts(4,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes2.ts(5,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/arithmeticOnInvalidTypes2.ts(5,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/arithmeticOnInvalidTypes2.ts (7 errors) ==== var obj = function f(a: T, b: T) { var z1 = a + b; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. var z2 = a - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var z3 = a * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var z4 = a / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. return a; }; \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt index 359d6c8095a..668a7bef6a0 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt @@ -1,3 +1,565 @@ +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(15,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(17,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(18,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(19,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(22,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(24,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(24,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(25,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(25,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(26,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(26,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(29,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(31,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(32,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(33,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(35,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(36,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(36,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(37,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(38,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(39,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(40,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(42,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(43,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(43,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(44,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(45,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(45,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(46,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(46,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(47,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(50,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(50,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(51,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(52,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(52,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(53,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(53,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(54,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(54,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(57,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(59,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(60,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(61,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(67,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(68,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(72,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(74,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(75,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(76,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(78,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(79,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(79,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(80,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(81,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(82,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(83,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(86,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(88,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(89,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(90,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(92,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(93,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(93,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(94,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(95,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(95,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(96,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(96,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(97,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(97,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(100,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(101,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(102,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(102,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(103,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(103,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(104,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(104,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(107,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(109,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(109,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(110,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(110,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(111,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(111,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(114,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(116,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(117,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(118,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(121,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(129,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(131,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(132,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(133,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(135,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(136,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(136,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(137,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(138,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(138,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(139,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(139,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(140,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(143,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(145,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(146,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(147,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(150,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(152,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(152,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(153,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(153,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(154,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(154,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(156,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(157,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(159,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(160,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(160,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(161,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(161,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(163,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(164,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(164,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(165,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(166,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(166,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(167,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(167,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(168,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(168,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(171,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(173,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(174,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(175,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(178,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(180,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(181,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(182,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(186,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(188,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(189,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(190,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(192,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(193,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(193,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(194,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(195,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(195,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(196,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(196,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(197,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(197,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(200,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(202,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(203,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(204,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(206,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(207,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(207,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(208,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(209,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(209,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(210,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(210,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(211,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(211,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(213,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(214,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(214,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(215,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(216,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(216,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(217,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(217,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(218,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(218,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(220,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(221,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(221,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(222,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(223,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(223,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(224,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(224,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(225,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(225,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(228,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(230,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(231,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(232,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(235,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(237,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(238,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(239,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(243,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(245,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(246,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(247,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(249,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(250,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(250,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(251,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(252,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(252,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(253,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(253,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(254,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(254,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(257,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(259,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(260,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(261,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(263,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(264,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(264,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(265,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(266,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(266,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(267,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(267,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(268,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(268,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(270,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(271,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(271,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(272,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(273,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(273,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(274,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(274,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(275,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(275,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(277,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(278,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(278,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(279,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(280,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(280,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(281,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(281,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(282,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(282,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(285,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(287,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(288,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(289,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(292,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(294,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(295,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(296,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(300,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(302,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(303,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(304,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(306,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(307,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(307,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(308,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(309,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(309,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(310,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(310,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(311,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(311,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(314,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(316,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(317,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(318,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(320,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(321,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(321,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(322,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(323,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(323,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(324,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(324,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(325,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(325,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(327,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(328,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(328,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(329,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(330,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(330,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(331,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(331,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(332,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(332,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(334,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(335,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(335,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(336,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(337,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(337,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(338,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(338,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(339,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(339,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(342,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(344,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(345,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(346,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(349,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(351,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(352,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(353,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(357,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(359,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(360,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(361,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(363,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(364,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(364,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(365,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(366,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(366,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(367,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(367,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(368,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(368,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(371,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(373,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(374,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(375,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(377,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(378,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(378,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(379,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(380,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(380,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(381,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(381,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(382,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(382,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(384,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(385,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(385,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(386,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(387,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(387,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(388,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(388,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(389,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(389,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(391,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(392,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(392,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(393,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(394,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(394,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(395,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(395,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(396,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(396,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(399,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(401,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(402,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(403,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(406,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(408,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(409,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(410,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(414,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(416,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(417,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(418,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(420,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(421,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(421,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(422,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(423,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(423,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(424,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(424,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(425,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(425,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(428,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(430,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(431,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(432,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(434,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(435,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(435,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(436,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(437,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(437,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(438,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(438,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(439,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(439,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(441,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(442,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(442,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(443,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(444,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(444,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(445,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(445,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(446,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(446,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(448,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(449,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(449,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(450,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(451,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(451,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(452,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(452,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(453,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(453,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(456,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(458,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(459,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(460,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(463,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(465,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(466,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(467,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(471,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(473,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(474,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(475,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(477,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(478,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(478,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(479,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(480,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(480,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(481,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(481,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(482,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(482,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(485,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(487,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(488,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(489,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(491,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(492,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(492,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(493,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(494,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(494,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(495,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(495,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(496,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(496,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(498,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(499,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(499,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(500,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(501,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(501,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(502,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(502,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(503,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(503,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(505,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(506,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(506,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(507,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(508,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(508,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(509,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(509,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(510,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(510,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(513,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(515,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(516,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(517,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(520,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(522,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(523,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(524,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(528,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(530,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(531,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(532,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(534,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(535,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(535,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(536,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(537,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(537,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(538,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(538,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(539,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(539,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(542,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(544,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(545,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(546,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(548,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(549,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(549,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(550,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(551,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(551,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(552,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(552,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(553,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(553,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(555,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(556,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(556,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(557,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(558,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(558,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(559,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(559,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(560,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(560,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(562,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(563,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(563,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(564,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(565,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(565,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(566,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(566,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(567,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(567,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(570,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(572,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(573,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(574,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(577,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(579,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(580,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(581,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts (560 errors) ==== // these operators require their operands to be of type Any, the Number primitive type, or // an enum type @@ -15,1688 +577,1688 @@ var r1a1 = a * a; //ok var r1a2 = a * b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = a * c; //ok var r1a4 = a * d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a5 = a * e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a6 = a * f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = b * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = b * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b4 = b * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b5 = b * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b6 = b * f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = c * a; //ok var r1c2 = c * b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = c * c; //ok var r1c4 = c * d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c5 = c * e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c6 = c * f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = d * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = d * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = d * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d4 = d * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d5 = d * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d6 = d * f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e1 = e * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e2 = e * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e3 = e * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e4 = e * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e5 = e * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e6 = e * f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f1 = f * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f2 = f * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f3 = f * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f4 = f * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f5 = f * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f6 = f * f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1g1 = E.a * a; //ok var r1g2 = E.a * b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1g3 = E.a * c; //ok var r1g4 = E.a * d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1g5 = E.a * e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1g6 = E.a * f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1h1 = a * E.b; //ok var r1h2 = b * E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1h3 = c * E.b; //ok var r1h4 = d * E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1h5 = e * E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1h6 = f * E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator / var r2a1 = a / a; //ok var r2a2 = a / b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = a / c; //ok var r2a4 = a / d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a5 = a / e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a6 = a / f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = b / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = b / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = b / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b4 = b / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b5 = b / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b6 = b / f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = c / a; //ok var r2c2 = c / b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = c / c; //ok var r2c4 = c / d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c5 = c / e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c6 = c / f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = d / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = d / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = d / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d4 = d / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d5 = d / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d6 = d / f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e1 = e / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e2 = e / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e3 = e / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e4 = e / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e5 = e / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e6 = e / f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f1 = f / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f2 = f / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f3 = f / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f4 = f / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f5 = f / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f6 = f / f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2g1 = E.a / a; //ok var r2g2 = E.a / b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2g3 = E.a / c; //ok var r2g4 = E.a / d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2g5 = E.a / e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2g6 = E.a / f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2h1 = a / E.b; //ok var r2h2 = b / E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2h3 = c / E.b; //ok var r2h4 = d / E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2h5 = e / E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2h6 = f / E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator % var r3a1 = a % a; //ok var r3a2 = a % b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a3 = a % c; //ok var r3a4 = a % d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a5 = a % e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a6 = a % f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b1 = b % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b2 = b % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b3 = b % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b4 = b % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b5 = b % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b6 = b % f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c1 = c % a; //ok var r3c2 = c % b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c3 = c % c; //ok var r3c4 = c % d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c5 = c % e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c6 = c % f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d1 = d % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d2 = d % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d3 = d % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d4 = d % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d5 = d % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d6 = d % f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e1 = e % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e2 = e % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e3 = e % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e4 = e % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e5 = e % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e6 = e % f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f1 = f % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f2 = f % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f3 = f % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f4 = f % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f5 = f % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f6 = f % f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3g1 = E.a % a; //ok var r3g2 = E.a % b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3g3 = E.a % c; //ok var r3g4 = E.a % d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3g5 = E.a % e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3g6 = E.a % f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3h1 = a % E.b; //ok var r3h2 = b % E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3h3 = c % E.b; //ok var r3h4 = d % E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3h5 = e % E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3h6 = f % E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator - var r4a1 = a - a; //ok var r4a2 = a - b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a3 = a - c; //ok var r4a4 = a - d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a5 = a - e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a6 = a - f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b1 = b - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b2 = b - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b3 = b - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b4 = b - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b5 = b - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b6 = b - f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c1 = c - a; //ok var r4c2 = c - b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c3 = c - c; //ok var r4c4 = c - d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c5 = c - e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c6 = c - f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d1 = d - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d2 = d - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d3 = d - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d4 = d - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d5 = d - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d6 = d - f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e1 = e - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e2 = e - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e3 = e - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e4 = e - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e5 = e - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e6 = e - f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f1 = f - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f2 = f - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f3 = f - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f4 = f - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f5 = f - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f6 = f - f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4g1 = E.a - a; //ok var r4g2 = E.a - b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4g3 = E.a - c; //ok var r4g4 = E.a - d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4g5 = E.a - e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4g6 = E.a - f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4h1 = a - E.b; //ok var r4h2 = b - E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4h3 = c - E.b; //ok var r4h4 = d - E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4h5 = e - E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4h6 = f - E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator << var r5a1 = a << a; //ok var r5a2 = a << b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a3 = a << c; //ok var r5a4 = a << d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a5 = a << e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a6 = a << f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b1 = b << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b2 = b << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b3 = b << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b4 = b << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b5 = b << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b6 = b << f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c1 = c << a; //ok var r5c2 = c << b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c3 = c << c; //ok var r5c4 = c << d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c5 = c << e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c6 = c << f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d1 = d << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d2 = d << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d3 = d << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d4 = d << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d5 = d << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d6 = d << f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e1 = e << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e2 = e << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e3 = e << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e4 = e << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e5 = e << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e6 = e << f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f1 = f << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f2 = f << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f3 = f << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f4 = f << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f5 = f << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f6 = f << f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5g1 = E.a << a; //ok var r5g2 = E.a << b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5g3 = E.a << c; //ok var r5g4 = E.a << d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5g5 = E.a << e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5g6 = E.a << f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5h1 = a << E.b; //ok var r5h2 = b << E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5h3 = c << E.b; //ok var r5h4 = d << E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5h5 = e << E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5h6 = f << E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >> var r6a1 = a >> a; //ok var r6a2 = a >> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a3 = a >> c; //ok var r6a4 = a >> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a5 = a >> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a6 = a >> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b1 = b >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b2 = b >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b3 = b >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b4 = b >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b5 = b >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b6 = b >> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c1 = c >> a; //ok var r6c2 = c >> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c3 = c >> c; //ok var r6c4 = c >> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c5 = c >> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c6 = c >> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d1 = d >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d2 = d >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d3 = d >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d4 = d >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d5 = d >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d6 = d >> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e1 = e >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e2 = e >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e3 = e >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e4 = e >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e5 = e >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e6 = e >> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f1 = f >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f2 = f >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f3 = f >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f4 = f >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f5 = f >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f6 = f >> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6g1 = E.a >> a; //ok var r6g2 = E.a >> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6g3 = E.a >> c; //ok var r6g4 = E.a >> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6g5 = E.a >> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6g6 = E.a >> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6h1 = a >> E.b; //ok var r6h2 = b >> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6h3 = c >> E.b; //ok var r6h4 = d >> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6h5 = e >> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6h6 = f >> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >>> var r7a1 = a >>> a; //ok var r7a2 = a >>> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a3 = a >>> c; //ok var r7a4 = a >>> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a5 = a >>> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a6 = a >>> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b1 = b >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b2 = b >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b3 = b >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b4 = b >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b5 = b >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b6 = b >>> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c1 = c >>> a; //ok var r7c2 = c >>> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c3 = c >>> c; //ok var r7c4 = c >>> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c5 = c >>> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c6 = c >>> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d1 = d >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d2 = d >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d3 = d >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d4 = d >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d5 = d >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d6 = d >>> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e1 = e >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e2 = e >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e3 = e >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e4 = e >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e5 = e >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e6 = e >>> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f1 = f >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f2 = f >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f3 = f >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f4 = f >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f5 = f >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f6 = f >>> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7g1 = E.a >>> a; //ok var r7g2 = E.a >>> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7g3 = E.a >>> c; //ok var r7g4 = E.a >>> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7g5 = E.a >>> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7g6 = E.a >>> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7h1 = a >>> E.b; //ok var r7h2 = b >>> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7h3 = c >>> E.b; //ok var r7h4 = d >>> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7h5 = e >>> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7h6 = f >>> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator & var r8a1 = a & a; //ok var r8a2 = a & b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a3 = a & c; //ok var r8a4 = a & d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a5 = a & e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a6 = a & f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b1 = b & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b2 = b & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b3 = b & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b4 = b & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b5 = b & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b6 = b & f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c1 = c & a; //ok var r8c2 = c & b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c3 = c & c; //ok var r8c4 = c & d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c5 = c & e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c6 = c & f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d1 = d & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d2 = d & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d3 = d & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d4 = d & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d5 = d & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d6 = d & f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e1 = e & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e2 = e & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e3 = e & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e4 = e & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e5 = e & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e6 = e & f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f1 = f & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f2 = f & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f3 = f & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f4 = f & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f5 = f & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f6 = f & f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8g1 = E.a & a; //ok var r8g2 = E.a & b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8g3 = E.a & c; //ok var r8g4 = E.a & d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8g5 = E.a & e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8g6 = E.a & f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8h1 = a & E.b; //ok var r8h2 = b & E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8h3 = c & E.b; //ok var r8h4 = d & E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8h5 = e & E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8h6 = f & E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator ^ var r9a1 = a ^ a; //ok var r9a2 = a ^ b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a3 = a ^ c; //ok var r9a4 = a ^ d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a5 = a ^ e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a6 = a ^ f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b1 = b ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b2 = b ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b3 = b ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b4 = b ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b5 = b ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b6 = b ^ f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c1 = c ^ a; //ok var r9c2 = c ^ b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c3 = c ^ c; //ok var r9c4 = c ^ d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c5 = c ^ e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c6 = c ^ f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d1 = d ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d2 = d ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d3 = d ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d4 = d ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d5 = d ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d6 = d ^ f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e1 = e ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e2 = e ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e3 = e ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e4 = e ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e5 = e ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e6 = e ^ f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f1 = f ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f2 = f ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f3 = f ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f4 = f ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f5 = f ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f6 = f ^ f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9g1 = E.a ^ a; //ok var r9g2 = E.a ^ b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9g3 = E.a ^ c; //ok var r9g4 = E.a ^ d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9g5 = E.a ^ e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9g6 = E.a ^ f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9h1 = a ^ E.b; //ok var r9h2 = b ^ E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9h3 = c ^ E.b; //ok var r9h4 = d ^ E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9h5 = e ^ E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9h6 = f ^ E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator | var r10a1 = a | a; //ok var r10a2 = a | b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a3 = a | c; //ok var r10a4 = a | d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a5 = a | e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a6 = a | f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b1 = b | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b2 = b | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b3 = b | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b4 = b | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b5 = b | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b6 = b | f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c1 = c | a; //ok var r10c2 = c | b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c3 = c | c; //ok var r10c4 = c | d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c5 = c | e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c6 = c | f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d1 = d | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d2 = d | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d3 = d | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d4 = d | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d5 = d | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d6 = d | f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e1 = e | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e2 = e | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e3 = e | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e4 = e | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e5 = e | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e6 = e | f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f1 = f | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f2 = f | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f3 = f | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f4 = f | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f5 = f | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f6 = f | f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10g1 = E.a | a; //ok var r10g2 = E.a | b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10g3 = E.a | c; //ok var r10g4 = E.a | d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10g5 = E.a | e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10g6 = E.a | f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10h1 = a | E.b; //ok var r10h2 = b | E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10h3 = c | E.b; //ok var r10h4 = d | E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10h5 = e | E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10h6 = f | E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt index 43c223bcd48..5ad26655c3c 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt @@ -1,3 +1,245 @@ +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts (240 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the // other operand. @@ -9,649 +251,649 @@ // operator * var r1a1 = null * a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a2 = null * b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = null * c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = a * null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b * null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = c * null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = null * true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c2 = null * ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = null * {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = true * null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = '' * null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = {} * null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator / var r2a1 = null / a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a2 = null / b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = null / c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = a / null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = b / null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = c / null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = null / true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c2 = null / ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = null / {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = true / null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = '' / null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = {} / null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator % var r3a1 = null % a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a2 = null % b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a3 = null % c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b1 = a % null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b2 = b % null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b3 = c % null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c1 = null % true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c2 = null % ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c3 = null % {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d1 = true % null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d2 = '' % null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d3 = {} % null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator - var r4a1 = null - a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a2 = null - b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a3 = null - c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b1 = a - null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b2 = b - null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b3 = c - null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c1 = null - true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c2 = null - ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c3 = null - {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d1 = true - null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d2 = '' - null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d3 = {} - null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator << var r5a1 = null << a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a2 = null << b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a3 = null << c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b1 = a << null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b2 = b << null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b3 = c << null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c1 = null << true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c2 = null << ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c3 = null << {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d1 = true << null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d2 = '' << null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d3 = {} << null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >> var r6a1 = null >> a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a2 = null >> b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a3 = null >> c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b1 = a >> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b2 = b >> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b3 = c >> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c1 = null >> true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c2 = null >> ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c3 = null >> {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d1 = true >> null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d2 = '' >> null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d3 = {} >> null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >>> var r7a1 = null >>> a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a2 = null >>> b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a3 = null >>> c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b1 = a >>> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b2 = b >>> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b3 = c >>> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c1 = null >>> true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c2 = null >>> ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c3 = null >>> {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d1 = true >>> null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d2 = '' >>> null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d3 = {} >>> null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator & var r8a1 = null & a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a2 = null & b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a3 = null & c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b1 = a & null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b2 = b & null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b3 = c & null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c1 = null & true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c2 = null & ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c3 = null & {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d1 = true & null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d2 = '' & null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d3 = {} & null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator ^ var r9a1 = null ^ a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a2 = null ^ b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a3 = null ^ c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b1 = a ^ null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b2 = b ^ null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b3 = c ^ null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c1 = null ^ true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c2 = null ^ ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c3 = null ^ {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d1 = true ^ null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d2 = '' ^ null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d3 = {} ^ null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator | var r10a1 = null | a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a2 = null | b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a3 = null | c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b1 = a | null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b2 = b | null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b3 = c | null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c1 = null | true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c2 = null | ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c3 = null | {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d1 = true | null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d2 = '' | null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d3 = {} | null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt index dd63c076c71..d00eee1d4dd 100644 --- a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -1,220 +1,302 @@ +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,11): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts (80 errors) ==== // operator * var ra1 = null * null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ra2 = null * undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ra3 = undefined * null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ra4 = undefined * undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator / var rb1 = null / null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rb2 = null / undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rb3 = undefined / null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rb4 = undefined / undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator % var rc1 = null % null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rc2 = null % undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rc3 = undefined % null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rc4 = undefined % undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator - var rd1 = null - null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rd2 = null - undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rd3 = undefined - null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rd4 = undefined - undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator << var re1 = null << null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var re2 = null << undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var re3 = undefined << null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var re4 = undefined << undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >> var rf1 = null >> null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rf2 = null >> undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rf3 = undefined >> null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rf4 = undefined >> undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >>> var rg1 = null >>> null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rg2 = null >>> undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rg3 = undefined >>> null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rg4 = undefined >>> undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator & var rh1 = null & null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rh2 = null & undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rh3 = undefined & null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rh4 = undefined & undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator ^ var ri1 = null ^ null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ri2 = null ^ undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ri3 = undefined ^ null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ri4 = undefined ^ undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator | var rj1 = null | null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rj2 = null | undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rj3 = undefined | null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rj4 = undefined | undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt index afc7a7ee392..a1de1f0c795 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt @@ -1,3 +1,185 @@ +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(9,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(10,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(11,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(12,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(13,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(14,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(15,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(16,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(17,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(18,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(20,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(21,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(22,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(23,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(24,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(25,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(26,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(27,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(28,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(29,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(31,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(31,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(32,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(32,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(33,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(33,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(34,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(34,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(35,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(35,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(36,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(36,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(37,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(37,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(38,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(38,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(39,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(39,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(40,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(40,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(42,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(42,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(43,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(43,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(44,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(44,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(45,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(45,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(46,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(46,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(47,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(47,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(48,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(48,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(49,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(49,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(50,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(50,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(51,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(51,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(53,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(54,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(55,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(56,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(57,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(58,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(59,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(60,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(61,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(62,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(64,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(65,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(66,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(67,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(68,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(69,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(70,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(71,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(72,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(73,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(75,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(75,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(76,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(76,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(77,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(77,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(78,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(78,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(79,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(79,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(80,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(80,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(81,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(81,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(82,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(82,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(83,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(83,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(84,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(84,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(86,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(86,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(87,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(87,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(88,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(88,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(89,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(89,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(90,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(90,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(91,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(91,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(92,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(92,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(93,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(93,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(94,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(94,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(95,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(95,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(97,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(97,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(98,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(98,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(99,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(99,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(100,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(100,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(101,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(101,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(102,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(102,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(103,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(103,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(104,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(104,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(105,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(105,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(106,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(106,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(108,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(108,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(109,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(109,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(110,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(110,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(111,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(111,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(112,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(112,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(113,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(113,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(114,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(114,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(115,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(115,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(116,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(116,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(117,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(117,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(119,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(119,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(120,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(120,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(121,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(121,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(122,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(122,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(123,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(123,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(124,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(124,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(125,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(125,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(126,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(126,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(127,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(127,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(128,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(128,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts (180 errors) ==== // type parameter type is not valid for arithmetic operand function foo(t: T) { @@ -9,482 +191,482 @@ var r1a1 = a * t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a2 = a / t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = a % t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a4 = a - t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a5 = a << t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a6 = a >> t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a7 = a >>> t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a8 = a & t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a9 = a ^ t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a10 = a | t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a1 = t * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a2 = t / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = t % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a4 = t - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a5 = t << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a6 = t >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a7 = t >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a8 = t & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a9 = t ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a10 = t | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = b * t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b / t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = b % t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b4 = b - t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b5 = b << t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b6 = b >> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b7 = b >>> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b8 = b & t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b9 = b ^ t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b10 = b | t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = t * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = t / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = t % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b4 = t - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b5 = t << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b6 = t >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b7 = t >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b8 = t & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b9 = t ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b10 = t | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = c * t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c2 = c / t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = c % t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c4 = c - t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c5 = c << t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c6 = c >> t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c7 = c >>> t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c8 = c & t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c9 = c ^ t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c10 = c | t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = t * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c2 = t / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = t % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c4 = t - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c5 = t << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c6 = t >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c7 = t >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c8 = t & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c9 = t ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c10 = t | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = d * t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = d / t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = d % t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d4 = d - t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d5 = d << t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d6 = d >> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d7 = d >>> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d8 = d & t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d9 = d ^ t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d10 = d | t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = t * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = t / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = t % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d4 = t - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d5 = t << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d6 = t >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d7 = t >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d8 = t & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d9 = t ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d10 = t | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e1 = e * t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e2 = e / t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e3 = e % t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e4 = e - t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e5 = e << t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e6 = e >> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e7 = e >>> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e8 = e & t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e9 = e ^ t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e10 = e | t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e1 = t * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e2 = t / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e3 = t % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e4 = t - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e5 = t << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e6 = t >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e7 = t >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e8 = t & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e9 = t ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e10 = t | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f1 = t * t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f2 = t / t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f3 = t % t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f4 = t - t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f5 = t << t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f6 = t >> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f7 = t >>> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f8 = t & t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f9 = t ^ t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f10 = t | t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. } \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt index 9552e5400d4..7bd250ae661 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -1,3 +1,245 @@ +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts (240 errors) ==== // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. @@ -9,649 +251,649 @@ // operator * var r1a1 = undefined * a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a2 = undefined * b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = undefined * c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = a * undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b * undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = c * undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = undefined * true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c2 = undefined * ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = undefined * {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = true * undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = '' * undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = {} * undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator / var r2a1 = undefined / a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a2 = undefined / b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = undefined / c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = a / undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = b / undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = c / undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = undefined / true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c2 = undefined / ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = undefined / {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = true / undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = '' / undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = {} / undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator % var r3a1 = undefined % a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a2 = undefined % b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a3 = undefined % c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b1 = a % undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b2 = b % undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b3 = c % undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c1 = undefined % true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c2 = undefined % ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c3 = undefined % {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d1 = true % undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d2 = '' % undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d3 = {} % undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator - var r4a1 = undefined - a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a2 = undefined - b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a3 = undefined - c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b1 = a - undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b2 = b - undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b3 = c - undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c1 = undefined - true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c2 = undefined - ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c3 = undefined - {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d1 = true - undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d2 = '' - undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d3 = {} - undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator << var r5a1 = undefined << a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a2 = undefined << b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a3 = undefined << c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b1 = a << undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b2 = b << undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b3 = c << undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c1 = undefined << true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c2 = undefined << ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c3 = undefined << {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d1 = true << undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d2 = '' << undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d3 = {} << undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >> var r6a1 = undefined >> a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a2 = undefined >> b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a3 = undefined >> c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b1 = a >> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b2 = b >> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b3 = c >> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c1 = undefined >> true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c2 = undefined >> ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c3 = undefined >> {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d1 = true >> undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d2 = '' >> undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d3 = {} >> undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >>> var r7a1 = undefined >>> a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a2 = undefined >>> b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a3 = undefined >>> c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b1 = a >>> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b2 = b >>> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b3 = c >>> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c1 = undefined >>> true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c2 = undefined >>> ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c3 = undefined >>> {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d1 = true >>> undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d2 = '' >>> undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d3 = {} >>> undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator & var r8a1 = undefined & a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a2 = undefined & b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a3 = undefined & c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b1 = a & undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b2 = b & undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b3 = c & undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c1 = undefined & true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c2 = undefined & ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c3 = undefined & {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d1 = true & undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d2 = '' & undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d3 = {} & undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator ^ var r9a1 = undefined ^ a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a2 = undefined ^ b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a3 = undefined ^ c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b1 = a ^ undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b2 = b ^ undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b3 = c ^ undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c1 = undefined ^ true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c2 = undefined ^ ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c3 = undefined ^ {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d1 = true ^ undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d2 = '' ^ undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d3 = {} ^ undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator | var r10a1 = undefined | a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a2 = undefined | b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a3 = undefined | c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b1 = a | undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b2 = b | undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b3 = c | undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c1 = undefined | true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c2 = undefined | ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c3 = undefined | {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d1 = true | undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d2 = '' | undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d3 = {} | undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest1.errors.txt b/tests/baselines/reference/arrayAssignmentTest1.errors.txt index e14bacb3cb4..926bf0d4316 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest1.errors.txt @@ -1,3 +1,52 @@ +tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2322: Type 'undefined[]' is not assignable to type 'I1': + Property 'IM1' is missing in type 'undefined[]'. +tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2322: Type 'undefined[]' is not assignable to type 'C1': + Property 'IM1' is missing in type 'undefined[]'. +tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2322: Type 'undefined[]' is not assignable to type 'C2': + Property 'C2M1' is missing in type 'undefined[]'. +tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2322: Type 'undefined[]' is not assignable to type 'C3': + Property 'CM3M1' is missing in type 'undefined[]'. +tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]': + Type 'C3' is not assignable to type 'I1': + Property 'IM1' is missing in type 'C3'. +tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2322: Type 'I1[]' is not assignable to type 'C1[]': + Type 'I1' is not assignable to type 'C1': + Property 'C1M1' is missing in type 'I1'. +tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2322: Type 'C3[]' is not assignable to type 'C1[]': + Type 'C3' is not assignable to type 'C1': + Property 'IM1' is missing in type 'C3'. +tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]': + Type 'C1' is not assignable to type 'C2': + Property 'C2M1' is missing in type 'C1'. +tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]': + Type 'I1' is not assignable to type 'C2': + Property 'C2M1' is missing in type 'I1'. +tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]': + Type 'C3' is not assignable to type 'C2': + Property 'C2M1' is missing in type 'C3'. +tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]': + Type 'C2' is not assignable to type 'C3': + Property 'CM3M1' is missing in type 'C2'. +tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]': + Type 'C1' is not assignable to type 'C3': + Property 'CM3M1' is missing in type 'C1'. +tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]': + Type 'I1' is not assignable to type 'C3': + Property 'CM3M1' is missing in type 'I1'. +tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]': + Property 'push' is missing in type '() => C1'. +tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': + Property 'length' is missing in type '{ one: number; }'. +tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2322: Type 'C1' is not assignable to type 'any[]': + Property 'length' is missing in type 'C1'. +tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2322: Type 'C2' is not assignable to type 'any[]': + Property 'length' is missing in type 'C2'. +tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2322: Type 'C3' is not assignable to type 'any[]': + Property 'length' is missing in type 'C3'. +tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is not assignable to type 'any[]': + Property 'length' is missing in type 'I1'. + + ==== tests/cases/compiler/arrayAssignmentTest1.ts (19 errors) ==== interface I1 { IM1():void[]; @@ -46,20 +95,20 @@ var i1_error: I1 = []; // should be an error - is ~~~~~~~~ -!!! Type 'undefined[]' is not assignable to type 'I1': -!!! Property 'IM1' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type 'I1': +!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'. var c1_error: C1 = []; // should be an error - is ~~~~~~~~ -!!! Type 'undefined[]' is not assignable to type 'C1': -!!! Property 'IM1' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type 'C1': +!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'. var c2_error: C2 = []; // should be an error - is ~~~~~~~~ -!!! Type 'undefined[]' is not assignable to type 'C2': -!!! Property 'C2M1' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type 'C2': +!!! error TS2322: Property 'C2M1' is missing in type 'undefined[]'. var c3_error: C3 = []; // should be an error - is ~~~~~~~~ -!!! Type 'undefined[]' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'undefined[]'. arr_any = arr_i1; // should be ok - is @@ -72,81 +121,81 @@ arr_i1 = arr_c2; // should be ok - subtype relationship - is arr_i1 = arr_c3; // should be an error - is ~~~~~~ -!!! Type 'C3[]' is not assignable to type 'I1[]': -!!! Type 'C3' is not assignable to type 'I1': -!!! Property 'IM1' is missing in type 'C3'. +!!! error TS2322: Type 'C3[]' is not assignable to type 'I1[]': +!!! error TS2322: Type 'C3' is not assignable to type 'I1': +!!! error TS2322: Property 'IM1' is missing in type 'C3'. arr_c1 = arr_c1; // should be ok - subtype relationship - is arr_c1 = arr_c2; // should be ok - subtype relationship - is arr_c1 = arr_i1; // should be an error - is ~~~~~~ -!!! Type 'I1[]' is not assignable to type 'C1[]': -!!! Type 'I1' is not assignable to type 'C1': -!!! Property 'C1M1' is missing in type 'I1'. +!!! error TS2322: Type 'I1[]' is not assignable to type 'C1[]': +!!! error TS2322: Type 'I1' is not assignable to type 'C1': +!!! error TS2322: Property 'C1M1' is missing in type 'I1'. arr_c1 = arr_c3; // should be an error - is ~~~~~~ -!!! Type 'C3[]' is not assignable to type 'C1[]': -!!! Type 'C3' is not assignable to type 'C1': -!!! Property 'IM1' is missing in type 'C3'. +!!! error TS2322: Type 'C3[]' is not assignable to type 'C1[]': +!!! error TS2322: Type 'C3' is not assignable to type 'C1': +!!! error TS2322: Property 'IM1' is missing in type 'C3'. arr_c2 = arr_c2; // should be ok - subtype relationship - is arr_c2 = arr_c1; // should be an error - subtype relationship - is ~~~~~~ -!!! Type 'C1[]' is not assignable to type 'C2[]': -!!! Type 'C1' is not assignable to type 'C2': -!!! Property 'C2M1' is missing in type 'C1'. +!!! error TS2322: Type 'C1[]' is not assignable to type 'C2[]': +!!! error TS2322: Type 'C1' is not assignable to type 'C2': +!!! error TS2322: Property 'C2M1' is missing in type 'C1'. arr_c2 = arr_i1; // should be an error - subtype relationship - is ~~~~~~ -!!! Type 'I1[]' is not assignable to type 'C2[]': -!!! Type 'I1' is not assignable to type 'C2': -!!! Property 'C2M1' is missing in type 'I1'. +!!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]': +!!! error TS2322: Type 'I1' is not assignable to type 'C2': +!!! error TS2322: Property 'C2M1' is missing in type 'I1'. arr_c2 = arr_c3; // should be an error - is ~~~~~~ -!!! Type 'C3[]' is not assignable to type 'C2[]': -!!! Type 'C3' is not assignable to type 'C2': -!!! Property 'C2M1' is missing in type 'C3'. +!!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]': +!!! error TS2322: Type 'C3' is not assignable to type 'C2': +!!! error TS2322: Property 'C2M1' is missing in type 'C3'. // "clean up bug" occurs at this point // if you move these three expressions to another file, they raise an error // something to do with state from the above propagating forward? arr_c3 = arr_c2_2; // should be an error - is ~~~~~~ -!!! Type 'C2[]' is not assignable to type 'C3[]': -!!! Type 'C2' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'C2'. +!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'C2' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'C2'. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ -!!! Type 'C1[]' is not assignable to type 'C3[]': -!!! Type 'C1' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'C1'. +!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'C1' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'C1'. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ -!!! Type 'I1[]' is not assignable to type 'C3[]': -!!! Type 'I1' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'I1'. +!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'I1' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'I1'. arr_any = f1; // should be an error - is ~~~~~~~ -!!! Type '() => C1' is not assignable to type 'any[]': -!!! Property 'push' is missing in type '() => C1'. +!!! error TS2322: Type '() => C1' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type '() => C1'. arr_any = o1; // should be an error - is ~~~~~~~ -!!! Type '{ one: number; }' is not assignable to type 'any[]': -!!! Property 'length' is missing in type '{ one: number; }'. +!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type '{ one: number; }'. arr_any = a1; // should be ok - is arr_any = c1; // should be an error - is ~~~~~~~ -!!! Type 'C1' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C1'. +!!! error TS2322: Type 'C1' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C1'. arr_any = c2; // should be an error - is ~~~~~~~ -!!! Type 'C2' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C2'. +!!! error TS2322: Type 'C2' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C2'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! Type 'C3' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C3'. +!!! error TS2322: Type 'C3' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C3'. arr_any = i1; // should be an error - is ~~~~~~~ -!!! Type 'I1' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'I1'. \ No newline at end of file +!!! error TS2322: Type 'I1' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'I1'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest2.errors.txt b/tests/baselines/reference/arrayAssignmentTest2.errors.txt index 5ecebfe392a..c9364ab555b 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest2.errors.txt @@ -1,3 +1,28 @@ +tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]': + Type 'C2' is not assignable to type 'C3': + Property 'CM3M1' is missing in type 'C2'. +tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]': + Type 'C1' is not assignable to type 'C3': + Property 'CM3M1' is missing in type 'C1'. +tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]': + Type 'I1' is not assignable to type 'C3': + Property 'CM3M1' is missing in type 'I1'. +tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]': + Property 'push' is missing in type '() => C1'. +tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]': + Property 'push' is missing in type '() => any'. +tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': + Property 'length' is missing in type '{ one: number; }'. +tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2322: Type 'C1' is not assignable to type 'any[]': + Property 'length' is missing in type 'C1'. +tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2322: Type 'C2' is not assignable to type 'any[]': + Property 'length' is missing in type 'C2'. +tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2322: Type 'C3' is not assignable to type 'any[]': + Property 'length' is missing in type 'C3'. +tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: Type 'I1' is not assignable to type 'any[]': + Property 'length' is missing in type 'I1'. + + ==== tests/cases/compiler/arrayAssignmentTest2.ts (10 errors) ==== interface I1 { IM1():void[]; @@ -47,47 +72,47 @@ // "clean up error" occurs at this point arr_c3 = arr_c2_2; // should be an error - is ~~~~~~ -!!! Type 'C2[]' is not assignable to type 'C3[]': -!!! Type 'C2' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'C2'. +!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'C2' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'C2'. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ -!!! Type 'C1[]' is not assignable to type 'C3[]': -!!! Type 'C1' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'C1'. +!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'C1' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'C1'. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ -!!! Type 'I1[]' is not assignable to type 'C3[]': -!!! Type 'I1' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'I1'. +!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'I1' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'I1'. arr_any = f1; // should be an error - is ~~~~~~~ -!!! Type '() => C1' is not assignable to type 'any[]': -!!! Property 'push' is missing in type '() => C1'. +!!! error TS2322: Type '() => C1' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type '() => C1'. arr_any = function () { return null;} // should be an error - is ~~~~~~~ -!!! Type '() => any' is not assignable to type 'any[]': -!!! Property 'push' is missing in type '() => any'. +!!! error TS2322: Type '() => any' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type '() => any'. arr_any = o1; // should be an error - is ~~~~~~~ -!!! Type '{ one: number; }' is not assignable to type 'any[]': -!!! Property 'length' is missing in type '{ one: number; }'. +!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type '{ one: number; }'. arr_any = a1; // should be ok - is arr_any = c1; // should be an error - is ~~~~~~~ -!!! Type 'C1' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C1'. +!!! error TS2322: Type 'C1' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C1'. arr_any = c2; // should be an error - is ~~~~~~~ -!!! Type 'C2' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C2'. +!!! error TS2322: Type 'C2' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C2'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! Type 'C3' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C3'. +!!! error TS2322: Type 'C3' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C3'. arr_any = i1; // should be an error - is ~~~~~~~ -!!! Type 'I1' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'I1'. +!!! error TS2322: Type 'I1' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'I1'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest3.errors.txt b/tests/baselines/reference/arrayAssignmentTest3.errors.txt index 4214ae5ef82..1c88408eb52 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/arrayAssignmentTest3.ts(12,25): error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'. + + ==== tests/cases/compiler/arrayAssignmentTest3.ts (1 errors) ==== // The following gives no error // Michal saw no error if he used number instead of B, @@ -12,6 +15,6 @@ var xx = new a(null, 7, new B()); ~~~~~~~ -!!! Argument of type 'B' is not assignable to parameter of type 'B[]'. +!!! error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest4.errors.txt b/tests/baselines/reference/arrayAssignmentTest4.errors.txt index 210e18dfe87..0d346e48293 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest4.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2322: Type '() => any' is not assignable to type 'any[]': + Property 'push' is missing in type '() => any'. +tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2322: Type 'C3' is not assignable to type 'any[]': + Property 'length' is missing in type 'C3'. + + ==== tests/cases/compiler/arrayAssignmentTest4.ts (2 errors) ==== @@ -24,10 +30,10 @@ arr_any = function () { return null;} // should be an error - is ~~~~~~~ -!!! Type '() => any' is not assignable to type 'any[]': -!!! Property 'push' is missing in type '() => any'. +!!! error TS2322: Type '() => any' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type '() => any'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! Type 'C3' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C3'. +!!! error TS2322: Type 'C3' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C3'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest5.errors.txt b/tests/baselines/reference/arrayAssignmentTest5.errors.txt index 9c63282d89a..417430b8e43 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest5.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]': + Type 'IToken' is not assignable to type 'IStateToken': + Property 'state' is missing in type 'IToken'. + + ==== tests/cases/compiler/arrayAssignmentTest5.ts (1 errors) ==== module Test { interface IState { @@ -23,9 +28,9 @@ var lineTokens:ILineTokens= this.tokenize(line, state, true); var tokens:IStateToken[]= lineTokens.tokens; ~~~~~~ -!!! Type 'IToken[]' is not assignable to type 'IStateToken[]': -!!! Type 'IToken' is not assignable to type 'IStateToken': -!!! Property 'state' is missing in type 'IToken'. +!!! error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]': +!!! error TS2322: Type 'IToken' is not assignable to type 'IStateToken': +!!! error TS2322: Property 'state' is missing in type 'IToken'. if (tokens.length === 0) { return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset) } diff --git a/tests/baselines/reference/arrayCast.errors.txt b/tests/baselines/reference/arrayCast.errors.txt index 509ee2110b7..2218bbf5a75 100644 --- a/tests/baselines/reference/arrayCast.errors.txt +++ b/tests/baselines/reference/arrayCast.errors.txt @@ -1,11 +1,16 @@ +tests/cases/compiler/arrayCast.ts(3,1): error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other: + Type '{ foo: string; }' is not assignable to type '{ id: number; }': + Property 'id' is missing in type '{ foo: string; }'. + + ==== tests/cases/compiler/arrayCast.ts (1 errors) ==== // Should fail. Even though the array is contextually typed with { id: number }[], it still // has type { foo: string }[], which is not assignable to { id: number }[]. <{ id: number; }[]>[{ foo: "s" }]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other: -!!! Type '{ foo: string; }' is not assignable to type '{ id: number; }': -!!! Property 'id' is missing in type '{ foo: string; }'. +!!! error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other: +!!! error TS2353: Type '{ foo: string; }' is not assignable to type '{ id: number; }': +!!! error TS2353: Property 'id' is missing in type '{ foo: string; }'. // Should succeed, as the {} element causes the type of the array to be {}[] <{ id: number; }[]>[{ foo: "s" }, {}]; \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt index 59137e1c4c1..75a69c09df8 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts(3,14): error TS2314: Generic type 'Array' requires 1 type argument(s). + + ==== tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts (1 errors) ==== var myCars=new Array(); var myCars3 = new Array({}); var myCars4: Array; // error ~~~~~ -!!! Generic type 'Array' requires 1 type argument(s). +!!! error TS2314: Generic type 'Array' requires 1 type argument(s). var myCars5: Array[]; myCars = myCars3; diff --git a/tests/baselines/reference/arrayLiteralContextualType.errors.txt b/tests/baselines/reference/arrayLiteralContextualType.errors.txt index e653cfc303a..5f661647d9f 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.errors.txt +++ b/tests/baselines/reference/arrayLiteralContextualType.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/arrayLiteralContextualType.ts(28,5): error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'IAnimal[]'. + Type '{}' is not assignable to type 'IAnimal'. +tests/cases/compiler/arrayLiteralContextualType.ts(29,5): error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ [x: number]: IAnimal; }'. + + ==== tests/cases/compiler/arrayLiteralContextualType.ts (2 errors) ==== interface IAnimal { name: string; @@ -28,8 +33,8 @@ var arr = [new Giraffe(), new Elephant()]; foo(arr); // Error because of no contextual type ~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type 'IAnimal[]'. -!!! Type '{}' is not assignable to type 'IAnimal'. +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'IAnimal[]'. +!!! error TS2345: Type '{}' is not assignable to type 'IAnimal'. bar(arr); // Error because of no contextual type ~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type '{ [x: number]: IAnimal; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ [x: number]: IAnimal; }'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt index 6cffd03f44b..f662bf20af3 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts(2,17): error TS2314: Generic type 'Array' requires 1 type argument(s). + + ==== tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts (1 errors) ==== class X { public f(a: Array) { } ~~~~~ -!!! Generic type 'Array' requires 1 type argument(s). +!!! error TS2314: Generic type 'Array' requires 1 type argument(s). } \ No newline at end of file diff --git a/tests/baselines/reference/arraySigChecking.errors.txt b/tests/baselines/reference/arraySigChecking.errors.txt index 3cb48f7a4e9..055c62c479b 100644 --- a/tests/baselines/reference/arraySigChecking.errors.txt +++ b/tests/baselines/reference/arraySigChecking.errors.txt @@ -1,3 +1,12 @@ +tests/cases/compiler/arraySigChecking.ts(11,17): error TS1023: An index signature parameter type must be 'string' or 'number'. +tests/cases/compiler/arraySigChecking.ts(18,5): error TS2322: Type 'void[]' is not assignable to type 'string[]': + Type 'void' is not assignable to type 'string'. +tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]' is not assignable to type 'number[][][]': + Type 'number[]' is not assignable to type 'number[][]': + Type 'number' is not assignable to type 'number[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/arraySigChecking.ts (3 errors) ==== declare module M { interface iBar { t: any; } @@ -11,7 +20,7 @@ var foo: { [index: any]; }; // expect an error here ~~~~~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. } interface myInt { @@ -20,17 +29,17 @@ var myVar: myInt; var strArray: string[] = [myVar.voidFn()]; ~~~~~~~~ -!!! Type 'void[]' is not assignable to type 'string[]': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'void[]' is not assignable to type 'string[]': +!!! error TS2322: Type 'void' is not assignable to type 'string'. var myArray: number[][][]; myArray = [[1, 2]]; ~~~~~~~ -!!! Type 'number[][]' is not assignable to type 'number[][][]': -!!! Type 'number[]' is not assignable to type 'number[][]': -!!! Type 'number' is not assignable to type 'number[]': -!!! Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'number[][]' is not assignable to type 'number[][][]': +!!! error TS2322: Type 'number[]' is not assignable to type 'number[][]': +!!! error TS2322: Type 'number' is not assignable to type 'number[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. function isEmpty(l: { length: number }) { return l.length === 0; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt b/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt index 58b4345bc02..b040c9eb1c9 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts(11,11): error TS2350: Only a void function can be called with the 'new' keyword. +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts(16,11): error TS2350: Only a void function can be called with the 'new' keyword. + + ==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts (2 errors) ==== // valid uses of arrays of function types @@ -11,11 +15,11 @@ var r4 = r3(); var r4b = new r3(); // error ~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var x3: Array<() => string>; var r5 = x2[1]; var r6 = r5(); var r6b = new r5(); // error ~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. \ No newline at end of file +!!! error TS2350: Only a void function can be called with the 'new' keyword. \ No newline at end of file diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt b/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt index fc8cd992cfa..7be76cb9c1b 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts(16,11): error TS2348: Value of type 'new () => string' is not callable. Did you mean to include 'new'? + + ==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts (1 errors) ==== // valid uses of arrays of function types @@ -16,4 +19,4 @@ var r6 = new r5(); var r6b = r5(); ~~~~ -!!! Value of type 'new () => string' is not callable. Did you mean to include 'new'? \ No newline at end of file +!!! error TS2348: Value of type 'new () => string' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt index cb877f5e57b..bb4867702ec 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt +++ b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt @@ -1,3 +1,12 @@ +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,22): error TS1005: '=' expected. +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1109: Expression expected. +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,22): error TS1005: '=' expected. +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,32): error TS1109: Expression expected. +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }': + Property 'isArray' is missing in type 'Number'. +tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. + + ==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts (6 errors) ==== // array type cannot use typeof. @@ -6,16 +15,16 @@ var xs2: typeof Array; var xs3: typeof Array; ~ -!!! '=' expected. +!!! error TS1005: '=' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~ -!!! Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }': -!!! Property 'isArray' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }': +!!! error TS2322: Property 'isArray' is missing in type 'Number'. var xs4: typeof Array; ~ -!!! '=' expected. +!!! error TS1005: '=' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~ -!!! Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. \ No newline at end of file +!!! error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionContexts.errors.txt b/tests/baselines/reference/arrowFunctionContexts.errors.txt index 9a1e3cdb618..2f8a4f1a377 100644 --- a/tests/baselines/reference/arrowFunctionContexts.errors.txt +++ b/tests/baselines/reference/arrowFunctionContexts.errors.txt @@ -1,11 +1,23 @@ +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(3,7): error TS2304: Cannot find name 'window'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(3,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(19,1): error TS2304: Cannot find name 'window'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,9): error TS2323: Type '() => number' is not assignable to type 'E'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(32,16): error TS2332: 'this' cannot be referenced in current location. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(44,11): error TS2304: Cannot find name 'window'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(44,11): error TS2410: All symbols within a 'with' block will be resolved to 'any'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(60,5): error TS2304: Cannot find name 'window'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,13): error TS2323: Type '() => number' is not assignable to type 'E'. +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(73,20): error TS2332: 'this' cannot be referenced in current location. + + ==== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts (10 errors) ==== // Arrow function used in with statement with (window) { ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. ~~~~~~ -!!! All symbols within a 'with' block will be resolved to 'any'. +!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. var p = () => this; } @@ -23,7 +35,7 @@ // Arrow function as function argument window.setTimeout(() => null, 100); ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. // Arrow function as value in array literal @@ -37,10 +49,10 @@ enum E { x = () => 4, // Error expected ~~~~~~~ -!!! Type '() => number' is not assignable to type 'E'. +!!! error TS2323: Type '() => number' is not assignable to type 'E'. y = (() => this).length // error, can't use this in enum ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. } // Arrow function as module variable initializer @@ -54,9 +66,9 @@ // Arrow function used in with statement with (window) { ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. ~~~~~~ -!!! All symbols within a 'with' block will be resolved to 'any'. +!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. var p = () => this; } @@ -74,7 +86,7 @@ // Arrow function as function argument window.setTimeout(() => null, 100); ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. // Arrow function as value in array literal @@ -88,10 +100,10 @@ enum E { x = () => 4, // Error expected ~~~~~~~ -!!! Type '() => number' is not assignable to type 'E'. +!!! error TS2323: Type '() => number' is not assignable to type 'E'. y = (() => this).length ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. } // Arrow function as module variable initializer diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt b/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt index e5f33b3e1eb..0fc1315078e 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/arrowFunctionInConstructorArgument1.ts(4,30): error TS2304: Cannot find name 'asdf'. + + ==== tests/cases/compiler/arrowFunctionInConstructorArgument1.ts (1 errors) ==== class C { constructor(x: () => void) { } } var c = new C(() => { return asdf; } ) // should error ~~~~ -!!! Cannot find name 'asdf'. +!!! error TS2304: Cannot find name 'asdf'. \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt index a0cf2c00518..cdc67fc09af 100644 --- a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt +++ b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts(2,15): error TS1109: Expression expected. + + ==== tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts (1 errors) ==== // Should error at semicolon. var f = () => ; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var b = 1 * 2 * 3 * 4; var square = (x: number) => x * x; \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt b/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt index 69b94cd7d46..128e22d119e 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt @@ -1,105 +1,131 @@ +tests/cases/compiler/arrowFunctionsMissingTokens.ts(3,16): error TS1005: '=>' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(5,22): error TS1005: '=>' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(7,17): error TS1005: '=>' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(9,36): error TS1005: '=>' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(11,42): error TS1005: '=>' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(16,23): error TS1005: '{' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(18,29): error TS1005: '{' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(20,24): error TS1005: '{' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(22,43): error TS1005: '{' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(24,49): error TS1005: '{' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(26,23): error TS1005: '{' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(30,23): error TS1109: Expression expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(32,29): error TS1109: Expression expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(34,24): error TS1109: Expression expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(36,43): error TS1109: Expression expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(38,49): error TS1109: Expression expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(40,23): error TS1109: Expression expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(41,5): error TS1128: Declaration or statement expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(42,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(45,14): error TS1109: Expression expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(47,21): error TS1005: '=>' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(51,35): error TS1005: '=>' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(53,41): error TS1005: '=>' expected. +tests/cases/compiler/arrowFunctionsMissingTokens.ts(49,14): error TS2304: Cannot find name 'x'. + + ==== tests/cases/compiler/arrowFunctionsMissingTokens.ts (24 errors) ==== module missingArrowsWithCurly { var a = () { }; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var b = (): void { } ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var c = (x) { }; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var d = (x: number, y: string) { }; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var e = (x: number, y: string): void { }; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. } module missingCurliesWithArrow { module withStatement { var a = () => var k = 10;}; ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var b = (): void => var k = 10;} ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var c = (x) => var k = 10;}; ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var d = (x: number, y: string) => var k = 10;}; ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var e = (x: number, y: string): void => var k = 10;}; ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var f = () => var k = 10;} ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. } module withoutStatement { var a = () => }; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var b = (): void => } ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var c = (x) => }; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var d = (x: number, y: string) => }; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var e = (x: number, y: string): void => }; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var f = () => } ~ -!!! Expression expected. +!!! error TS1109: Expression expected. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. module ce_nEst_pas_une_arrow_function { var a = (); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var b = (): void; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var c = (x); ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. var d = (x: number, y: string); ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var e = (x: number, y: string): void; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. } module okay { diff --git a/tests/baselines/reference/asiReturn.errors.txt b/tests/baselines/reference/asiReturn.errors.txt index 7b7b44655c2..1cc3ec8a3c1 100644 --- a/tests/baselines/reference/asiReturn.errors.txt +++ b/tests/baselines/reference/asiReturn.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/asiReturn.ts(2,1): error TS1108: A 'return' statement can only be used within a function body. + + ==== tests/cases/compiler/asiReturn.ts (1 errors) ==== // This should be an error for using a return outside a function, but ASI should work properly return ~~~~~~ -!!! A 'return' statement can only be used within a function body. \ No newline at end of file +!!! error TS1108: A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt b/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt index 007b23dc474..f9019661fb5 100644 --- a/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt +++ b/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/assertInWrapSomeTypeParameter.ts(2,26): error TS1005: '>' expected. +tests/cases/compiler/assertInWrapSomeTypeParameter.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/assertInWrapSomeTypeParameter.ts (2 errors) ==== class C> { ~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo>(x: U) { ~ -!!! '>' expected. +!!! error TS1005: '>' expected. return null; } } \ No newline at end of file diff --git a/tests/baselines/reference/assignAnyToEveryType.errors.txt b/tests/baselines/reference/assignAnyToEveryType.errors.txt index a6eadd12038..9aae6efc37e 100644 --- a/tests/baselines/reference/assignAnyToEveryType.errors.txt +++ b/tests/baselines/reference/assignAnyToEveryType.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/any/assignAnyToEveryType.ts(41,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/conformance/types/any/assignAnyToEveryType.ts (1 errors) ==== // all of these are valid @@ -41,7 +44,7 @@ M = x; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function k(a: T) { a = x; diff --git a/tests/baselines/reference/assignFromBooleanInterface.errors.txt b/tests/baselines/reference/assignFromBooleanInterface.errors.txt index 679399d4533..48f06b7409e 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3,1): error TS2323: Type 'Boolean' is not assignable to type 'boolean'. + + ==== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts (1 errors) ==== var x = true; var a: Boolean; x = a; ~ -!!! Type 'Boolean' is not assignable to type 'boolean'. +!!! error TS2323: Type 'Boolean' is not assignable to type 'boolean'. a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt index fc1350681f4..495f8cc432d 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(19,1): error TS2323: Type 'Boolean' is not assignable to type 'boolean'. +tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(20,1): error TS2323: Type 'NotBoolean' is not assignable to type 'boolean'. + + ==== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts (2 errors) ==== interface Boolean { doStuff(): string; @@ -19,9 +23,9 @@ x = a; // expected error ~ -!!! Type 'Boolean' is not assignable to type 'boolean'. +!!! error TS2323: Type 'Boolean' is not assignable to type 'boolean'. x = b; // expected error ~ -!!! Type 'NotBoolean' is not assignable to type 'boolean'. +!!! error TS2323: Type 'NotBoolean' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignFromNumberInterface.errors.txt b/tests/baselines/reference/assignFromNumberInterface.errors.txt index 845b8cb5b7f..5a65c08de4a 100644 --- a/tests/baselines/reference/assignFromNumberInterface.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1): error TS2323: Type 'Number' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts (1 errors) ==== var x = 1; var a: Number; x = a; ~ -!!! Type 'Number' is not assignable to type 'number'. +!!! error TS2323: Type 'Number' is not assignable to type 'number'. a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromNumberInterface2.errors.txt b/tests/baselines/reference/assignFromNumberInterface2.errors.txt index 331232f6cea..45a600658c2 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(23,1): error TS2323: Type 'Number' is not assignable to type 'number'. +tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24,1): error TS2323: Type 'NotNumber' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts (2 errors) ==== interface Number { doStuff(): string; @@ -23,9 +27,9 @@ x = a; // expected error ~ -!!! Type 'Number' is not assignable to type 'number'. +!!! error TS2323: Type 'Number' is not assignable to type 'number'. x = b; // expected error ~ -!!! Type 'NotNumber' is not assignable to type 'number'. +!!! error TS2323: Type 'NotNumber' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignFromStringInterface.errors.txt b/tests/baselines/reference/assignFromStringInterface.errors.txt index ba8c5fd583c..93f28853c8a 100644 --- a/tests/baselines/reference/assignFromStringInterface.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1): error TS2323: Type 'String' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts (1 errors) ==== var x = ''; var a: String; x = a; ~ -!!! Type 'String' is not assignable to type 'string'. +!!! error TS2323: Type 'String' is not assignable to type 'string'. a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromStringInterface2.errors.txt b/tests/baselines/reference/assignFromStringInterface2.errors.txt index 6a8f5e5f6f0..b34366a7ce7 100644 --- a/tests/baselines/reference/assignFromStringInterface2.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(46,1): error TS2323: Type 'String' is not assignable to type 'string'. +tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47,1): error TS2323: Type 'NotString' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts (2 errors) ==== interface String { doStuff(): string; @@ -46,9 +50,9 @@ x = a; // expected error ~ -!!! Type 'String' is not assignable to type 'string'. +!!! error TS2323: Type 'String' is not assignable to type 'string'. x = b; // expected error ~ -!!! Type 'NotString' is not assignable to type 'string'. +!!! error TS2323: Type 'NotString' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt index 78c710a7d50..580c6fa3c45 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts(7,4): error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. + Property 'x' is missing in type '(a: any, b: any) => boolean'. +tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts(8,4): error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. + Property 'x' is missing in type '(a: any, b: any) => boolean'. + + ==== tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts (2 errors) ==== interface IResultCallback extends Function { x: number; @@ -7,10 +13,10 @@ fn((a, b) => true); ~~~~~~~~~~~~~~ -!!! Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. -!!! Property 'x' is missing in type '(a: any, b: any) => boolean'. +!!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. +!!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean'. fn(function (a, b) { return true; }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. -!!! Property 'x' is missing in type '(a: any, b: any) => boolean'. +!!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. +!!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignToEnum.errors.txt b/tests/baselines/reference/assignToEnum.errors.txt index bc37cc5496d..4846a96dbb7 100644 --- a/tests/baselines/reference/assignToEnum.errors.txt +++ b/tests/baselines/reference/assignToEnum.errors.txt @@ -1,16 +1,22 @@ +tests/cases/compiler/assignToEnum.ts(2,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/compiler/assignToEnum.ts(3,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/compiler/assignToEnum.ts(4,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/compiler/assignToEnum.ts(5,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/compiler/assignToEnum.ts (4 errors) ==== enum A { foo, bar } A = undefined; // invalid LHS ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. A = A.bar; // invalid LHS ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. A.foo = 1; // invalid LHS ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. A.foo = A.bar; // invalid LHS ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignToExistingClass.errors.txt b/tests/baselines/reference/assignToExistingClass.errors.txt index 49feb0a76a0..6a377df5b0c 100644 --- a/tests/baselines/reference/assignToExistingClass.errors.txt +++ b/tests/baselines/reference/assignToExistingClass.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/assignToExistingClass.ts(8,13): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/compiler/assignToExistingClass.ts (1 errors) ==== module Test { class Mocked { @@ -8,7 +11,7 @@ willThrowError() { Mocked = Mocked || function () { // => Error: Invalid left-hand side of assignment expression. ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. return { myProp: "test" }; }; } diff --git a/tests/baselines/reference/assignToFn.errors.txt b/tests/baselines/reference/assignToFn.errors.txt index 10af5946425..6b1403b7df1 100644 --- a/tests/baselines/reference/assignToFn.errors.txt +++ b/tests/baselines/reference/assignToFn.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/assignToFn.ts(8,5): error TS2323: Type 'string' is not assignable to type '(n: number) => boolean'. + + ==== tests/cases/compiler/assignToFn.ts (1 errors) ==== module M { interface I { @@ -8,6 +11,6 @@ x.f="hello"; ~~~ -!!! Type 'string' is not assignable to type '(n: number) => boolean'. +!!! error TS2323: Type 'string' is not assignable to type '(n: number) => boolean'. } \ No newline at end of file diff --git a/tests/baselines/reference/assignToInvalidLHS.errors.txt b/tests/baselines/reference/assignToInvalidLHS.errors.txt index dd183cf6391..a39756d15f7 100644 --- a/tests/baselines/reference/assignToInvalidLHS.errors.txt +++ b/tests/baselines/reference/assignToInvalidLHS.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/assignToInvalidLHS.ts(4,9): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/compiler/assignToInvalidLHS.ts (1 errors) ==== declare var y:any; // Below is actually valid JavaScript (see http://es5.github.com/#x8.7 ), even though will always fail at runtime with 'invalid left-hand side' var x = new y = 5; ~~~~~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignToModule.errors.txt b/tests/baselines/reference/assignToModule.errors.txt index ba284a32fa6..26121d72a05 100644 --- a/tests/baselines/reference/assignToModule.errors.txt +++ b/tests/baselines/reference/assignToModule.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/assignToModule.ts(2,1): error TS2304: Cannot find name 'A'. + + ==== tests/cases/compiler/assignToModule.ts (1 errors) ==== module A {} A = undefined; // invalid LHS ~ -!!! Cannot find name 'A'. \ No newline at end of file +!!! error TS2304: Cannot find name 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompat1.errors.txt b/tests/baselines/reference/assignmentCompat1.errors.txt index 540bb044f6a..0e22bd1b391 100644 --- a/tests/baselines/reference/assignmentCompat1.errors.txt +++ b/tests/baselines/reference/assignmentCompat1.errors.txt @@ -1,12 +1,18 @@ +tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }': + Property 'one' is missing in type '{ [x: string]: any; }'. +tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }': + Index signature is missing in type '{ one: number; }'. + + ==== tests/cases/compiler/assignmentCompat1.ts (2 errors) ==== var x = {one: 1}; var y: {[index:string]: any}; x = y; ~ -!!! Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }': -!!! Property 'one' is missing in type '{ [x: string]: any; }'. +!!! error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }': +!!! error TS2322: Property 'one' is missing in type '{ [x: string]: any; }'. y = x; ~ -!!! Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }': -!!! Index signature is missing in type '{ one: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }': +!!! error TS2322: Index signature is missing in type '{ one: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatBug2.errors.txt b/tests/baselines/reference/assignmentCompatBug2.errors.txt index ddbc1706930..260aa868dfd 100644 --- a/tests/baselines/reference/assignmentCompatBug2.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug2.errors.txt @@ -1,13 +1,25 @@ +tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': + Property 'b' is missing in type '{ a: number; }'. +tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': + Property 'b' is missing in type '{ a: number; }'. +tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': + Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'. +tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': + Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'. +tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': + Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'. + + ==== tests/cases/compiler/assignmentCompatBug2.ts (5 errors) ==== var b2: { b: number;} = { a: 0 }; // error ~~ -!!! Type '{ a: number; }' is not assignable to type '{ b: number; }': -!!! Property 'b' is missing in type '{ a: number; }'. +!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': +!!! error TS2322: Property 'b' is missing in type '{ a: number; }'. b2 = { a: 0 }; // error ~~ -!!! Type '{ a: number; }' is not assignable to type '{ b: number; }': -!!! Property 'b' is missing in type '{ a: number; }'. +!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': +!!! error TS2322: Property 'b' is missing in type '{ a: number; }'. b2 = {b: 0, a: 0 }; @@ -21,16 +33,16 @@ b3 = { ~~ -!!! Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': -!!! Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'. +!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': +!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'. f: (n) => { return 0; }, g: (s) => { return 0; }, }; // error b3 = { ~~ -!!! Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': -!!! Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'. +!!! error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': +!!! error TS2322: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'. f: (n) => { return 0; }, m: 0, }; // error @@ -45,8 +57,8 @@ b3 = { ~~ -!!! Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': -!!! Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'. +!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': +!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'. f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, diff --git a/tests/baselines/reference/assignmentCompatBug3.errors.txt b/tests/baselines/reference/assignmentCompatBug3.errors.txt index f2cb650567e..fe7ff5bbddc 100644 --- a/tests/baselines/reference/assignmentCompatBug3.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug3.errors.txt @@ -1,12 +1,17 @@ +tests/cases/compiler/assignmentCompatBug3.ts(3,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/assignmentCompatBug3.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/assignmentCompatBug3.ts(14,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/assignmentCompatBug3.ts (3 errors) ==== function makePoint(x: number, y: number) { return { get x() { return x;}, // shouldn't be "void" ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. get y() { return y;}, // shouldn't be "void" ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. //x: "yo", //y: "boo", dist: function () { @@ -18,7 +23,7 @@ class C { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; } } diff --git a/tests/baselines/reference/assignmentCompatBug5.errors.txt b/tests/baselines/reference/assignmentCompatBug5.errors.txt index cd8f24cee3f..a015cc3bbcf 100644 --- a/tests/baselines/reference/assignmentCompatBug5.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug5.errors.txt @@ -1,22 +1,30 @@ +tests/cases/compiler/assignmentCompatBug5.ts(2,6): error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. + Property 'a' is missing in type '{ b: number; }'. +tests/cases/compiler/assignmentCompatBug5.ts(5,6): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'number[]'. + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/assignmentCompatBug5.ts(8,6): error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. +tests/cases/compiler/assignmentCompatBug5.ts(9,6): error TS2345: Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'. + + ==== tests/cases/compiler/assignmentCompatBug5.ts (4 errors) ==== function foo1(x: { a: number; }) { } foo1({ b: 5 }); ~~~~~~~~ -!!! Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. -!!! Property 'a' is missing in type '{ b: number; }'. +!!! error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. +!!! error TS2345: Property 'a' is missing in type '{ b: number; }'. function foo2(x: number[]) { } foo2(["s", "t"]); ~~~~~~~~~~ -!!! Argument of type 'string[]' is not assignable to parameter of type 'number[]'. -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'number[]'. +!!! error TS2345: Type 'string' is not assignable to type 'number'. function foo3(x: (n: number) =>number) { }; foo3((s:string) => { }); ~~~~~~~~~~~~~~~~~ -!!! Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. +!!! error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. foo3((n) => { return; }); ~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'. +!!! error TS2345: Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt index fda1cca3d8e..a17c09988a3 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt @@ -1,15 +1,23 @@ +tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(4,5): error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'. + Types of property 'name' are incompatible: + Type 'boolean' is not assignable to type 'string'. +tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. + Property 'id' is missing in type '{ name: string; }'. + + ==== tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts (3 errors) ==== function foo(x: { id: number; name?: string; }): void; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. foo({ id: 1234 }); // Ok foo({ id: 1234, name: "hello" }); // Ok foo({ id: 1234, name: false }); // Error, name of wrong type ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'. -!!! Types of property 'name' are incompatible: -!!! Type 'boolean' is not assignable to type 'string'. +!!! error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'. +!!! error TS2345: Types of property 'name' are incompatible: +!!! error TS2345: Type 'boolean' is not assignable to type 'string'. foo({ name: "hello" }); // Error, id required but missing ~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. -!!! Property 'id' is missing in type '{ name: string; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. +!!! error TS2345: Property 'id' is missing in type '{ name: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt index 7d84f69b3d2..f972c9a925e 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts(15,5): error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. + + ==== tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts (1 errors) ==== interface IHandler { (e): boolean; @@ -15,5 +18,5 @@ Biz(new Foo()); ~~~~~~~~~ -!!! Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. +!!! error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt index ab314d0a95f..e2016fb7029 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt @@ -1,3 +1,29 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2322: Type 'S2' is not assignable to type 'T': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2322: Type 'S2' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts (8 errors) ==== // void returning call signatures can be assigned a non-void returning call signature that otherwise matches @@ -35,42 +61,42 @@ // these are errors t = s2; ~ -!!! Type 'S2' is not assignable to type 'T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'S2' is not assignable to type 'T': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = a3; ~ -!!! Type '(x: string) => void' is not assignable to type 'T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = s2; ~ -!!! Type 'S2' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'S2' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = a3; ~ -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt index 2fa4e383e9f..1aed50f25f1 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt @@ -1,3 +1,41 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2322: Type '() => number' is not assignable to type 'T': + Property 'f' is missing in type '() => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T': + Property 'f' is missing in type '(x: number) => string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }': + Property 'f' is missing in type '() => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(34,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }': + Property 'f' is missing in type '(x: number) => string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2322: Type 'S2' is not assignable to type 'T': + Types of property 'f' are incompatible: + Type '(x: string) => void' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T': + Types of property 'f' are incompatible: + Type '(x: string) => void' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T': + Property 'f' is missing in type '(x: string) => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T': + Property 'f' is missing in type '(x: string) => string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }': + Types of property 'f' are incompatible: + Type '(x: string) => void' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }': + Types of property 'f' are incompatible: + Type '(x: string) => void' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }': + Property 'f' is missing in type '(x: string) => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }': + Property 'f' is missing in type '(x: string) => string'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts (12 errors) ==== // void returning call signatures can be assigned a non-void returning call signature that otherwise matches @@ -31,20 +69,20 @@ // errors t = () => 1; ~ -!!! Type '() => number' is not assignable to type 'T': -!!! Property 'f' is missing in type '() => number'. +!!! error TS2322: Type '() => number' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '() => number'. t = function (x: number) { return ''; } ~ -!!! Type '(x: number) => string' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: number) => string'. +!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. a = () => 1; ~ -!!! Type '() => number' is not assignable to type '{ f(x: number): void; }': -!!! Property 'f' is missing in type '() => number'. +!!! error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Property 'f' is missing in type '() => number'. a = function (x: number) { return ''; } ~ -!!! Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }': -!!! Property 'f' is missing in type '(x: number) => string'. +!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. interface S2 { f(x: string): void; @@ -54,46 +92,46 @@ // these are errors t = s2; ~ -!!! Type 'S2' is not assignable to type 'T': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'S2' is not assignable to type 'T': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = a3; ~ -!!! Type '{ f(x: string): void; }' is not assignable to type 'T': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: string) => number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. t = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: string) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. a = s2; ~ -!!! Type 'S2' is not assignable to type '{ f(x: number): void; }': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = a3; ~ -!!! Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }': -!!! Property 'f' is missing in type '(x: string) => number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. a = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }': -!!! Property 'f' is missing in type '(x: string) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index 973dfe92ca2..92bc30a7144 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': + Types of parameters 'y' and 'y' are incompatible: + Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': + Types of parameters 'arg2' and 'arg2' are incompatible: + Type '{ foo: number; }' is not assignable to type 'Base': + Types of property 'foo' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': + Types of parameters 'y' and 'y' are incompatible: + Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': + Types of parameters 'arg2' and 'arg2' are incompatible: + Type 'Base' is not assignable to type '{ foo: number; }': + Types of property 'foo' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts (2 errors) ==== // These are mostly permitted with the current loose rules. All ok unless otherwise noted. @@ -52,22 +68,22 @@ var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, { foo: number } and Base are incompatible ~~ -!!! Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type '{ foo: number; }' is not assignable to type 'Base': -!!! Types of property 'foo' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. b8 = a8; // error, { foo: number } and Base are incompatible ~~ -!!! Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type 'Base' is not assignable to type '{ foo: number; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var b10: (...x: T[]) => T; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt index 125def7dc62..2bdd0ef61a9 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt @@ -1,3 +1,12 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(16,5): error TS2323: Type '(x: number) => number' is not assignable to type '() => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(19,5): error TS2323: Type '(x: number) => number' is not assignable to type '() => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(20,5): error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '() => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(22,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '() => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(33,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(39,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts (7 errors) ==== // call signatures in derived types must have the same or fewer optional parameters as the base type @@ -16,19 +25,19 @@ a = (x?: number) => 1; // ok, same number of required params a = (x: number) => 1; // error, too many required params ~ -!!! Type '(x: number) => number' is not assignable to type '() => number'. +!!! error TS2323: Type '(x: number) => number' is not assignable to type '() => number'. a = b.a; // ok a = b.a2; // ok a = b.a3; // error ~ -!!! Type '(x: number) => number' is not assignable to type '() => number'. +!!! error TS2323: Type '(x: number) => number' is not assignable to type '() => number'. a = b.a4; // error ~ -!!! Type '(x: number, y?: number) => number' is not assignable to type '() => number'. +!!! error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '() => number'. a = b.a5; // ok a = b.a6; // error ~ -!!! Type '(x: number, y: number) => number' is not assignable to type '() => number'. +!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '() => number'. var a2: (x?: number) => number; a2 = () => 1; // ok, same number of required params @@ -41,7 +50,7 @@ a2 = b.a5; // ok a2 = b.a6; // error ~~ -!!! Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'. +!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'. var a3: (x: number) => number; a3 = () => 1; // ok, fewer required params @@ -49,7 +58,7 @@ a3 = (x: number) => 1; // ok, same number of required params a3 = (x: number, y: number) => 1; // error, too many required params ~~ -!!! Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. a3 = b.a; // ok a3 = b.a2; // ok a3 = b.a3; // ok @@ -57,7 +66,7 @@ a3 = b.a5; // ok a3 = b.a6; // error ~~ -!!! Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. var a4: (x: number, y?: number) => number; a4 = () => 1; // ok, fewer required params diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt index 7bee15e16b7..117f6cae0e9 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt @@ -1,3 +1,32 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number': + Types of parameters 'args' and 'args' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number': + Types of parameters 'x' and 'args' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number': + Types of parameters 'args' and 'z' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': + Types of parameters 'y' and 'y' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': + Types of parameters 'z' and 'y' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': + Types of parameters 'y' and 'y' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': + Types of parameters 'y' and 'y' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': + Types of parameters 'args' and 'z' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts (9 errors) ==== // call signatures in derived types must have the same or fewer optional parameters as the target for assignment @@ -13,17 +42,17 @@ a = (...args: number[]) => 1; // ok, same number of required params a = (...args: string[]) => 1; // error, type mismatch ~ -!!! Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number': -!!! Types of parameters 'args' and 'args' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number': +!!! error TS2322: Types of parameters 'args' and 'args' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = (x?: number) => 1; // ok, same number of required params a = (x?: number, y?: number, z?: number) => 1; // ok, same number of required params a = (x: number) => 1; // ok, rest param corresponds to infinite number of params a = (x?: string) => 1; // error, incompatible type ~ -!!! Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number': -!!! Types of parameters 'x' and 'args' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number': +!!! error TS2322: Types of parameters 'x' and 'args' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var a2: (x: number, ...z: number[]) => number; @@ -34,9 +63,9 @@ a2 = (x: number, ...args: number[]) => 1; // ok, same number of required params a2 = (x: number, ...args: string[]) => 1; // should be type mismatch error ~~ -!!! Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number': -!!! Types of parameters 'args' and 'z' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'args' and 'z' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a2 = (x: number, y: number) => 1; // ok, rest param corresponds to infinite number of params a2 = (x: number, y?: number) => 1; // ok, same number of required params @@ -47,36 +76,36 @@ a3 = (x: number, y: string) => 1; // ok, all present params match a3 = (x: number, y?: number, z?: number) => 1; // error ~~ -!!! Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. a3 = (x: number, ...z: number[]) => 1; // error ~~ -!!! Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'z' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'z' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. a3 = (x: string, y?: string, z?: string) => 1; // error ~~ -!!! Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var a4: (x?: number, y?: string, ...z: number[]) => number; a4 = () => 1; // ok, fewer required params a4 = (x?: number, y?: number) => 1; // error, type mismatch ~~ -!!! Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. a4 = (x: number) => 1; // ok, all present params match a4 = (x: number, y?: number) => 1; // error, second param has type mismatch ~~ -!!! Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. a4 = (x?: number, y?: string) => 1; // ok, same number of required params with matching types a4 = (x: number, ...args: string[]) => 1; // error, rest params have type mismatch ~~ -!!! Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'args' and 'z' are incompatible: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'args' and 'z' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt index 46c7804b144..f37aca50710 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(28,1): error TS2323: Type 'S2' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(29,1): error TS2323: Type '(x: string) => void' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(30,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(31,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(32,1): error TS2323: Type 'S2' is not assignable to type 'new (x: number) => void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(33,1): error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(34,1): error TS2323: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(35,1): error TS2323: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts (8 errors) ==== // void returning call signatures can be assigned a non-void returning call signature that otherwise matches @@ -28,26 +38,26 @@ // these are errors t = s2; ~ -!!! Type 'S2' is not assignable to type 'T'. +!!! error TS2323: Type 'S2' is not assignable to type 'T'. t = a3; ~ -!!! Type '(x: string) => void' is not assignable to type 'T'. +!!! error TS2323: Type '(x: string) => void' is not assignable to type 'T'. t = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'T'. +!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'. t = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'T'. +!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'. a = s2; ~ -!!! Type 'S2' is not assignable to type 'new (x: number) => void'. +!!! error TS2323: Type 'S2' is not assignable to type 'new (x: number) => void'. a = a3; ~ -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. a = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. +!!! error TS2323: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. a = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. +!!! error TS2323: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt index 703bf50d294..6213a2c27ce 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt @@ -1,3 +1,33 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2322: Type '() => number' is not assignable to type 'T': + Property 'f' is missing in type '() => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T': + Property 'f' is missing in type '(x: number) => string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }': + Property 'f' is missing in type '() => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(26,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }': + Property 'f' is missing in type '(x: number) => string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2322: Type 'S2' is not assignable to type 'T': + Types of property 'f' are incompatible: + Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T': + Types of property 'f' are incompatible: + Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T': + Property 'f' is missing in type '(x: string) => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T': + Property 'f' is missing in type '(x: string) => string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }': + Types of property 'f' are incompatible: + Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }': + Types of property 'f' are incompatible: + Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }': + Property 'f' is missing in type '(x: string) => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }': + Property 'f' is missing in type '(x: string) => string'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts (12 errors) ==== // void returning call signatures can be assigned a non-void returning call signature that otherwise matches @@ -23,20 +53,20 @@ // errors t = () => 1; ~ -!!! Type '() => number' is not assignable to type 'T': -!!! Property 'f' is missing in type '() => number'. +!!! error TS2322: Type '() => number' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '() => number'. t = function (x: number) { return ''; } ~ -!!! Type '(x: number) => string' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: number) => string'. +!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. a = () => 1; ~ -!!! Type '() => number' is not assignable to type '{ f: new (x: number) => void; }': -!!! Property 'f' is missing in type '() => number'. +!!! error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Property 'f' is missing in type '() => number'. a = function (x: number) { return ''; } ~ -!!! Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }': -!!! Property 'f' is missing in type '(x: number) => string'. +!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. interface S2 { f(x: string): void; @@ -46,38 +76,38 @@ // these are errors t = s2; ~ -!!! Type 'S2' is not assignable to type 'T': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type 'S2' is not assignable to type 'T': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. t = a3; ~ -!!! Type '{ f(x: string): void; }' is not assignable to type 'T': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. t = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: string) => number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. t = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: string) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. a = s2; ~ -!!! Type 'S2' is not assignable to type '{ f: new (x: number) => void; }': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. a = a3; ~ -!!! Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. a = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }': -!!! Property 'f' is missing in type '(x: string) => number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. a = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }': -!!! Property 'f' is missing in type '(x: string) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index c5055b16e89..b88beac6099 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -1,3 +1,31 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2322: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': + Types of parameters 'y' and 'y' are incompatible: + Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': + Types of parameters 'arg2' and 'arg2' are incompatible: + Type '{ foo: number; }' is not assignable to type 'Base': + Types of property 'foo' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': + Types of parameters 'y' and 'y' are incompatible: + Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': + Types of parameters 'arg2' and 'arg2' are incompatible: + Type 'Base' is not assignable to type '{ foo: number; }': + Types of property 'foo' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }': + Types of parameters 'x' and 'x' are incompatible: + Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]': + Types of parameters 'x' and 'x' are incompatible: + Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }': + Types of parameters 'x' and 'x' are incompatible: + Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]': + Types of parameters 'x' and 'x' are incompatible: + Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts (6 errors) ==== // checking assignment compatibility relations for function types. @@ -52,22 +80,22 @@ var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, type mismatch ~~ -!!! Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type '{ foo: number; }' is not assignable to type 'Base': -!!! Types of property 'foo' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. b8 = a8; // error ~~ -!!! Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type 'Base' is not assignable to type '{ foo: number; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var b10: new (...x: T[]) => T; @@ -93,26 +121,26 @@ var b16: new (x: (a: T) => T) => T[]; a16 = b16; // error ~~~ -!!! Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. +!!! error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. b16 = a16; // error ~~~ -!!! Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. +!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. var b17: new (x: (a: T) => T) => any[]; a17 = b17; // error ~~~ -!!! Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. +!!! error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. b17 = a17; // error ~~~ -!!! Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. +!!! error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. } module WithGenericSignaturesInBaseType { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt index 69098417e53..3a477e0c9ec 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(16,5): error TS2323: Type 'new (x: number) => number' is not assignable to type 'new () => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(17,5): error TS2323: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(19,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(27,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts (5 errors) ==== // call signatures in derived types must have the same or fewer optional parameters as the base type @@ -16,14 +23,14 @@ a = b.a2; // ok a = b.a3; // error ~ -!!! Type 'new (x: number) => number' is not assignable to type 'new () => number'. +!!! error TS2323: Type 'new (x: number) => number' is not assignable to type 'new () => number'. a = b.a4; // error ~ -!!! Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'. +!!! error TS2323: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'. a = b.a5; // ok a = b.a6; // error ~ -!!! Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'. +!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'. var a2: new (x?: number) => number; a2 = b.a; // ok @@ -33,7 +40,7 @@ a2 = b.a5; // ok a2 = b.a6; // error ~~ -!!! Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'. +!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'. var a3: new (x: number) => number; a3 = b.a; // ok @@ -43,7 +50,7 @@ a3 = b.a5; // ok a3 = b.a6; // error ~~ -!!! Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. +!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. var a4: new (x: number, y?: number) => number; a4 = b.a; // ok diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt index d5fb8f331fb..bc82b0fa69c 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts(7,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts(8,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts (2 errors) ==== // some complex cases of assignment compat of generic signatures. @@ -7,10 +11,10 @@ var x: >(z: T) => void ~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var y: >>(z: T) => void ~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. // These both do not make sense as we would eventually be comparing I2 to I2>, and they are self referencing anyway x = y diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt index 5807bbb1663..18d853f006f 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(14,13): error TS2323: Type '(x: T) => any' is not assignable to type '() => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(23,13): error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(65,9): error TS2323: Type '(x: T) => T' is not assignable to type '() => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2323: Type '(x: T) => any' is not assignable to type '() => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts (6 errors) ==== // call signatures in derived types must have the same or fewer optional parameters as the target for assignment @@ -14,7 +22,7 @@ this.a = (x?: T) => null; // ok, same T of required params this.a = (x: T) => null; // error, too many required params ~~~~~~ -!!! Type '(x: T) => any' is not assignable to type '() => T'. +!!! error TS2323: Type '(x: T) => any' is not assignable to type '() => T'. this.a2 = () => null; // ok, same T of required params this.a2 = (x?: T) => null; // ok, same T of required params @@ -25,7 +33,7 @@ this.a3 = (x: T) => null; // ok, same T of required params this.a3 = (x: T, y: T) => null; // error, too many required params ~~~~~~~ -!!! Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +!!! error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. this.a4 = () => null; // ok, fewer required params this.a4 = (x?: T, y?: T) => null; // ok, fewer required params @@ -69,10 +77,10 @@ b.a = t.a2; b.a = t.a3; ~~~ -!!! Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2323: Type '(x: T) => T' is not assignable to type '() => T'. b.a = t.a4; ~~~ -!!! Type '(x: T, y?: T) => T' is not assignable to type '() => T'. +!!! error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. b.a = t.a5; b.a2 = t.a; @@ -115,7 +123,7 @@ this.a = (x?: T) => null; // ok, same T of required params this.a = (x: T) => null; // error, too many required params ~~~~~~ -!!! Type '(x: T) => any' is not assignable to type '() => T'. +!!! error TS2323: Type '(x: T) => any' is not assignable to type '() => T'. this.a2 = () => null; // ok, same T of required params this.a2 = (x?: T) => null; // ok, same T of required params @@ -126,7 +134,7 @@ this.a3 = (x: T) => null; // ok, same T of required params this.a3 = (x: T, y: T) => null; // error, too many required params ~~~~~~~ -!!! Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +!!! error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. this.a4 = () => null; // ok, fewer required params this.a4 = (x?: T, y?: T) => null; // ok, fewer required params diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt index 0974c579daf..c4111661b14 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt @@ -1,3 +1,27 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived2' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts (6 errors) ==== // Derived type indexer must be subtype of base type indexer @@ -14,19 +38,19 @@ a = b; b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. module Generics { class A { @@ -42,28 +66,28 @@ var b: { [x: number]: Derived; } a = b; // error ~ -!!! Type '{ [x: number]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; // error ~ -!!! Type '{ [x: number]: Derived2; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived2' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. var b3: { [x: number]: T; } a = b3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt index 35a0cf283a5..fcd337ee615 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt @@ -1,3 +1,27 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived2' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts (6 errors) ==== // Derived type indexer must be subtype of base type indexer @@ -14,19 +38,19 @@ a = b; b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. module Generics { interface A { @@ -42,28 +66,28 @@ var b: { [x: number]: Derived; } a = b; // error ~ -!!! Type '{ [x: number]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; // error ~ -!!! Type '{ [x: number]: Derived2; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived2' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. var b3: { [x: number]: T; } a = b3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt index dfc46323757..84b51350785 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt @@ -1,3 +1,16 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': + Index signatures are incompatible: + Type 'Derived' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Derived'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived' is not assignable to type 'T'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts (3 errors) ==== // Derived type indexer must be subtype of base type indexer @@ -14,10 +27,10 @@ a = b; // error ~ -!!! Type '{ [x: number]: Base; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. b = a; // ok class B2 extends A { @@ -28,10 +41,10 @@ a = b2; // ok b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. module Generics { class A { @@ -43,9 +56,9 @@ var b: { [x: number]: Derived; }; a = b; // error ~ -!!! Type '{ [x: number]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // ok var b2: { [x: number]: T; }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt index 7b0e088f851..606eef809f0 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt @@ -1,3 +1,73 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2322: Type 'T' is not assignable to type 'S': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2322: Type 'S' is not assignable to type 'T': + Types of property 'foo' are incompatible: + Type 'Derived' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Derived'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2322: Type 'T2' is not assignable to type 'S2': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(30,5): error TS2322: Type 'S2' is not assignable to type 'T2': + Types of property 'foo' are incompatible: + Type 'Derived' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Derived'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(31,5): error TS2322: Type 'T' is not assignable to type 'S2': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(32,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(35,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(36,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': + Types of property 'foo' are incompatible: + Type 'Derived' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Derived'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(41,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(42,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': + Types of property 'foo' are incompatible: + Type 'Derived' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Derived'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(43,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(44,5): error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(45,5): error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }': + Types of property 'foo' are incompatible: + Type 'Derived2' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Derived2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2322: Type 'S' is not assignable to type 'T': + Types of property 'foo' are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2322: Type 'S2' is not assignable to type 'T2': + Types of property 'foo' are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(81,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': + Types of property 'foo' are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': + Types of property 'foo' are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts (17 errors) ==== // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M @@ -24,91 +94,91 @@ s = t; // error ~ -!!! Type 'T' is not assignable to type 'S': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T' is not assignable to type 'S': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. t = s; // error ~ -!!! Type 'S' is not assignable to type 'T': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type 'S' is not assignable to type 'T': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. s = s2; // ok s = a2; // ok s2 = t2; // error ~~ -!!! Type 'T2' is not assignable to type 'S2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T2' is not assignable to type 'S2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. t2 = s2; // error ~~ -!!! Type 'S2' is not assignable to type 'T2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type 'S2' is not assignable to type 'T2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. s2 = t; // error ~~ -!!! Type 'T' is not assignable to type 'S2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T' is not assignable to type 'S2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. s2 = b; // error ~~ -!!! Type '{ foo: Derived2; }' is not assignable to type 'S2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. s2 = a2; // ok a = b; // error ~ -!!! Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. b = a; // error ~ -!!! Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. a = s; // ok a = s2; // ok a = a2; // ok a2 = b2; // error ~~ -!!! Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. b2 = a2; // error ~~ -!!! Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. a2 = b; // error ~~ -!!! Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. a2 = t2; // error ~~ -!!! Type 'T2' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. a2 = t; // error ~~ -!!! Type 'T' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. } module WithBase { @@ -135,20 +205,20 @@ s = t; // ok t = s; // error ~ -!!! Type 'S' is not assignable to type 'T': -!!! Types of property 'foo' are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'S' is not assignable to type 'T': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. s = s2; // ok s = a2; // ok s2 = t2; // ok t2 = s2; // error ~~ -!!! Type 'S2' is not assignable to type 'T2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'S2' is not assignable to type 'T2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. s2 = t; // ok s2 = b; // ok s2 = a2; // ok @@ -156,10 +226,10 @@ a = b; // ok b = a; // error ~ -!!! Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. a = s; // ok a = s2; // ok a = a2; // ok @@ -167,10 +237,10 @@ a2 = b2; // ok b2 = a2; // error ~~ -!!! Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. a2 = b; // ok a2 = t2; // ok a2 = t; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt index d3e92899a84..c63813d343d 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2322: Type 'I' is not assignable to type 'C': + Property 'foo' is missing in type 'I'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2322: Type 'C' is not assignable to type 'I': + Property 'fooo' is missing in type 'C'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts (2 errors) ==== class C { foo: string; @@ -13,9 +19,9 @@ c = i; // error ~ -!!! Type 'I' is not assignable to type 'C': -!!! Property 'foo' is missing in type 'I'. +!!! error TS2322: Type 'I' is not assignable to type 'C': +!!! error TS2322: Property 'foo' is missing in type 'I'. i = c; // error ~ -!!! Type 'C' is not assignable to type 'I': -!!! Property 'fooo' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'I': +!!! error TS2322: Property 'fooo' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt index 75ba383671c..75f36240e03 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt @@ -1,3 +1,53 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2322: Type 'E' is not assignable to type 'Base': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2322: Type 'E' is not assignable to type 'I': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2322: Type 'E' is not assignable to type 'D': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2322: Type 'Base' is not assignable to type 'E': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2322: Type 'I' is not assignable to type 'E': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2322: Type 'D' is not assignable to type 'E': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2322: Type 'Base' is not assignable to type '{ foo: string; }': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2322: Type 'I' is not assignable to type '{ foo: string; }': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'Base': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2322: Type 'D' is not assignable to type 'Base': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2322: Type 'E' is not assignable to type 'Base': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'I': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2322: Type 'D' is not assignable to type 'I': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2322: Type 'E' is not assignable to type 'I': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'D': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2322: Type 'I' is not assignable to type 'D': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2322: Type 'E' is not assignable to type 'D': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2322: Type 'Base' is not assignable to type 'E': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2322: Type 'I' is not assignable to type 'E': + Private property 'foo' cannot be reimplemented. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' is not assignable to type 'E': + Private property 'foo' cannot be reimplemented. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts (24 errors) ==== // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M @@ -31,49 +81,49 @@ a = d; a = e; // error ~ -!!! Type 'E' is not assignable to type '{ foo: string; }': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = a; b = i; b = d; b = e; // error ~ -!!! Type 'E' is not assignable to type 'Base': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'Base': +!!! error TS2322: Private property 'foo' cannot be reimplemented. i = a; i = b; i = d; i = e; // error ~ -!!! Type 'E' is not assignable to type 'I': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'I': +!!! error TS2322: Private property 'foo' cannot be reimplemented. d = a; d = b; d = i; d = e; // error ~ -!!! Type 'E' is not assignable to type 'D': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'D': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = a; // errror ~ -!!! Type '{ foo: string; }' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = b; // errror ~ -!!! Type 'Base' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'Base' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = i; // errror ~ -!!! Type 'I' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'I' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = d; // errror ~ -!!! Type 'D' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'D' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = e; } @@ -105,78 +155,78 @@ a = b; // error ~ -!!! Type 'Base' is not assignable to type '{ foo: string; }': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: string; }': +!!! error TS2322: Private property 'foo' cannot be reimplemented. a = i; // error ~ -!!! Type 'I' is not assignable to type '{ foo: string; }': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'I' is not assignable to type '{ foo: string; }': +!!! error TS2322: Private property 'foo' cannot be reimplemented. a = d; a = e; // error ~ -!!! Type 'E' is not assignable to type '{ foo: string; }': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = a; // error ~ -!!! Type '{ foo: string; }' is not assignable to type 'Base': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'Base': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = i; b = d; // error ~ -!!! Type 'D' is not assignable to type 'Base': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'D' is not assignable to type 'Base': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = e; // error ~ -!!! Type 'E' is not assignable to type 'Base': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'Base': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = b; i = a; // error ~ -!!! Type '{ foo: string; }' is not assignable to type 'I': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'I': +!!! error TS2322: Private property 'foo' cannot be reimplemented. i = b; i = d; // error ~ -!!! Type 'D' is not assignable to type 'I': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'D' is not assignable to type 'I': +!!! error TS2322: Private property 'foo' cannot be reimplemented. i = e; // error ~ -!!! Type 'E' is not assignable to type 'I': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'I': +!!! error TS2322: Private property 'foo' cannot be reimplemented. i = i; d = a; d = b; // error ~ -!!! Type 'Base' is not assignable to type 'D': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'Base' is not assignable to type 'D': +!!! error TS2322: Private property 'foo' cannot be reimplemented. d = i; // error ~ -!!! Type 'I' is not assignable to type 'D': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'I' is not assignable to type 'D': +!!! error TS2322: Private property 'foo' cannot be reimplemented. d = e; // error ~ -!!! Type 'E' is not assignable to type 'D': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'D': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = a; // errror ~ -!!! Type '{ foo: string; }' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = b; // errror ~ -!!! Type 'Base' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'Base' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = i; // errror ~ -!!! Type 'I' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'I' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = d; // errror ~ -!!! Type 'D' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'D' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = e; } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt index 1e2b287f942..0731e5746bc 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt @@ -1,3 +1,17 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2322: Type 'D' is not assignable to type 'C': + Required property 'opt' cannot be reimplemented with optional property in 'D'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2322: Type 'E' is not assignable to type 'C': + Required property 'opt' cannot be reimplemented with optional property in 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': + Required property 'opt' cannot be reimplemented with optional property in 'D'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': + Required property 'opt' cannot be reimplemented with optional property in 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': + Required property 'opt' cannot be reimplemented with optional property in 'D'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': + Required property 'opt' cannot be reimplemented with optional property in 'E'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts (6 errors) ==== // Derived member is not optional but base member is, should be ok @@ -73,34 +87,34 @@ c = d; // error ~ -!!! Type 'D' is not assignable to type 'C': -!!! Required property 'opt' cannot be reimplemented with optional property in 'D'. +!!! error TS2322: Type 'D' is not assignable to type 'C': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'D'. c = e; // error ~ -!!! Type 'E' is not assignable to type 'C': -!!! Required property 'opt' cannot be reimplemented with optional property in 'E'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'E'. c = f; // ok c = a; // ok a = d; // error ~ -!!! Type 'D' is not assignable to type '{ opt: Base; }': -!!! Required property 'opt' cannot be reimplemented with optional property in 'D'. +!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'D'. a = e; // error ~ -!!! Type 'E' is not assignable to type '{ opt: Base; }': -!!! Required property 'opt' cannot be reimplemented with optional property in 'E'. +!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'E'. a = f; // ok a = c; // ok b = d; // error ~ -!!! Type 'D' is not assignable to type '{ opt: Base; }': -!!! Required property 'opt' cannot be reimplemented with optional property in 'D'. +!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'D'. b = e; // error ~ -!!! Type 'E' is not assignable to type '{ opt: Base; }': -!!! Required property 'opt' cannot be reimplemented with optional property in 'E'. +!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'E'. b = f; // ok b = a; // ok b = c; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt index 4d4344a8af2..e1bf35ef2c2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt @@ -1,3 +1,23 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2322: Type 'D' is not assignable to type 'C': + Property 'opt' is missing in type 'D'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2322: Type 'E' is not assignable to type 'C': + Property 'opt' is missing in type 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2322: Type 'F' is not assignable to type 'C': + Property 'opt' is missing in type 'F'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': + Property 'opt' is missing in type 'D'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': + Property 'opt' is missing in type 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2322: Type 'F' is not assignable to type '{ opt: Base; }': + Property 'opt' is missing in type 'F'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': + Property 'opt' is missing in type 'D'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': + Property 'opt' is missing in type 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2322: Type 'F' is not assignable to type '{ opt: Base; }': + Property 'opt' is missing in type 'F'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts (9 errors) ==== // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N @@ -74,44 +94,44 @@ c = d; // error ~ -!!! Type 'D' is not assignable to type 'C': -!!! Property 'opt' is missing in type 'D'. +!!! error TS2322: Type 'D' is not assignable to type 'C': +!!! error TS2322: Property 'opt' is missing in type 'D'. c = e; // error ~ -!!! Type 'E' is not assignable to type 'C': -!!! Property 'opt' is missing in type 'E'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Property 'opt' is missing in type 'E'. c = f; // error ~ -!!! Type 'F' is not assignable to type 'C': -!!! Property 'opt' is missing in type 'F'. +!!! error TS2322: Type 'F' is not assignable to type 'C': +!!! error TS2322: Property 'opt' is missing in type 'F'. c = a; // ok a = d; // error ~ -!!! Type 'D' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'D'. +!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'D'. a = e; // error ~ -!!! Type 'E' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'E'. +!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'E'. a = f; // error ~ -!!! Type 'F' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'F'. +!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'F'. a = c; // ok b = d; // error ~ -!!! Type 'D' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'D'. +!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'D'. b = e; // error ~ -!!! Type 'E' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'E'. +!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'E'. b = f; // error ~ -!!! Type 'F' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'F'. +!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'F'. b = a; // ok b = c; // ok } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index 954fbfe88e4..370355a7373 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -1,3 +1,63 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2322: Type 'T' is not assignable to type 'S': + Property ''1'' is missing in type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2322: Type 'S' is not assignable to type 'T': + Property ''1.'' is missing in type 'S'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': + Property ''1'' is missing in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2322: Type 'T2' is not assignable to type 'S2': + Property ''1'' is missing in type 'T2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2322: Type 'S2' is not assignable to type 'T2': + Property ''1.0'' is missing in type 'S2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2322: Type 'T' is not assignable to type 'S2': + Property ''1'' is missing in type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2': + Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': + Property ''1'' is missing in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }': + Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type 'S'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type 'S2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }': + Property ''1.0'' is missing in type '{ '1': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }': + Property ''1'' is missing in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': + Property ''1.0'' is missing in type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': + Property ''1'' is missing in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': + Property ''1'' is missing in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }': + Property '1.0' is missing in type '{ '1.': string; bar?: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type 'S'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type 'S2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }': + Property ''1.'' is missing in type '{ 1.: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }': + Property ''1.0'' is missing in type '{ 1.: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }': + Property '1.' is missing in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }': + Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }': + Property ''1.0'' is missing in type 'T2'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': + Property ''1.0'' is missing in type 'T'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts (29 errors) ==== // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // string named numeric properties work correctly, errors below unless otherwise noted @@ -21,74 +81,74 @@ s = t; ~ -!!! Type 'T' is not assignable to type 'S': -!!! Property ''1'' is missing in type 'T'. +!!! error TS2322: Type 'T' is not assignable to type 'S': +!!! error TS2322: Property ''1'' is missing in type 'T'. t = s; ~ -!!! Type 'S' is not assignable to type 'T': -!!! Property ''1.'' is missing in type 'S'. +!!! error TS2322: Type 'S' is not assignable to type 'T': +!!! error TS2322: Property ''1.'' is missing in type 'S'. s = s2; // ok s = a2; ~ -!!! Type '{ '1.0': string; }' is not assignable to type 'S': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. s2 = t2; ~~ -!!! Type 'T2' is not assignable to type 'S2': -!!! Property ''1'' is missing in type 'T2'. +!!! error TS2322: Type 'T2' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type 'T2'. t2 = s2; ~~ -!!! Type 'S2' is not assignable to type 'T2': -!!! Property ''1.0'' is missing in type 'S2'. +!!! error TS2322: Type 'S2' is not assignable to type 'T2': +!!! error TS2322: Property ''1.0'' is missing in type 'S2'. s2 = t; ~~ -!!! Type 'T' is not assignable to type 'S2': -!!! Property ''1'' is missing in type 'T'. +!!! error TS2322: Type 'T' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type 'T'. s2 = b; ~~ -!!! Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2': -!!! Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'. +!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'. s2 = a2; ~~ -!!! Type '{ '1.0': string; }' is not assignable to type 'S2': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. a = b; ~ -!!! Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'. +!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'. b = a; ~ -!!! Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }': -!!! Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'. +!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }': +!!! error TS2322: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'. a = s; ~ -!!! Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type 'S'. +!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type 'S'. a = s2; ~ -!!! Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type 'S2'. +!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type 'S2'. a = a2; ~ -!!! Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'. a2 = b2; ~~ -!!! Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type '{ '1': string; }'. +!!! error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type '{ '1': string; }'. b2 = a2; ~~ -!!! Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. a2 = b; // ok a2 = t2; // ok a2 = t; ~~ -!!! Type 'T' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type 'T'. +!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type 'T'. } module NumbersAndStrings { @@ -113,8 +173,8 @@ s = s2; // ok s = a2; // error ~ -!!! Type '{ '1.0': string; }' is not assignable to type 'S': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. s2 = t2; // ok t2 = s2; // ok @@ -122,52 +182,52 @@ s2 = b; // ok s2 = a2; // error ~~ -!!! Type '{ '1.0': string; }' is not assignable to type 'S2': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. a = b; // error ~ -!!! Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'. +!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'. b = a; // error ~ -!!! Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }': -!!! Property '1.0' is missing in type '{ '1.': string; bar?: string; }'. +!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }': +!!! error TS2322: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'. a = s; // error ~ -!!! Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type 'S'. +!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type 'S'. a = s2; // error ~ -!!! Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type 'S2'. +!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type 'S2'. a = a2; // error ~ -!!! Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'. a = b2; // error ~ -!!! Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ 1.: string; }'. +!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ 1.: string; }'. a2 = b2; // error ~~ -!!! Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type '{ 1.: string; }'. +!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type '{ 1.: string; }'. b2 = a2; // error ~~ -!!! Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }': -!!! Property '1.' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }': +!!! error TS2322: Property '1.' is missing in type '{ '1.0': string; }'. a2 = b; // error ~~ -!!! Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'. +!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'. a2 = t2; // error ~~ -!!! Type 'T2' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type 'T2'. +!!! error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type 'T2'. a2 = t; // error ~~ -!!! Type 'T' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type 'T'. +!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt index 350ff22c18d..55e62ae2266 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt @@ -1,3 +1,15 @@ +tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number': + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number': + Types of parameters 'x' and 's1' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number': + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/assignmentCompatWithOverloads.ts (4 errors) ==== function f1(x: string): number { return null; } @@ -17,19 +29,19 @@ g = f2; // Error ~ -!!! Type '(x: string) => string' is not assignable to type '(s1: string) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. g = f3; // Error ~ -!!! Type '(x: number) => number' is not assignable to type '(s1: string) => number': -!!! Types of parameters 'x' and 's1' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number': +!!! error TS2322: Types of parameters 'x' and 's1' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. g = f4; // Error ~ -!!! Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. class C { constructor(x: string); @@ -40,6 +52,6 @@ d = C; // Error ~ -!!! Type 'typeof C' is not assignable to type 'new (x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt index b9e63626e11..630c508fc75 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt @@ -1,3 +1,35 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived2' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts (8 errors) ==== // index signatures must be compatible in assignments @@ -15,19 +47,19 @@ a = b; // ok b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. module Generics { class A { @@ -43,10 +75,10 @@ a1 = b1; // ok b1 = a1; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. class B2 extends A { [x: string]: Derived2; // ok @@ -56,37 +88,37 @@ a1 = b2; // ok b2 = a1; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. function foo() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! Type '{ [x: string]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b3 = a3; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b4: { [x: string]: Derived2; }; a3 = b4; // error ~~ -!!! Type '{ [x: string]: Derived2; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived2' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b4 = a3; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt index e2ab94c037e..de88bc13bad 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt @@ -1,3 +1,35 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': + Index signatures are incompatible: + Type 'Base' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'Derived': + Property 'bar' is missing in type 'Base'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'Derived2' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'Derived2': + Property 'baz' is missing in type 'Base'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts (8 errors) ==== // index signatures must be compatible in assignments @@ -15,19 +47,19 @@ a = b; // ok b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. module Generics { interface A { @@ -43,10 +75,10 @@ a1 = b1; // ok b1 = a1; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. interface B2 extends A { [x: string]: Derived2; // ok @@ -56,37 +88,37 @@ a1 = b2; // ok b2 = a1; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. function foo() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! Type '{ [x: string]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b3 = a3; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b4: { [x: string]: Derived2; }; a3 = b4; // error ~~ -!!! Type '{ [x: string]: Derived2; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived2' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b4 = a3; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt index f4f6dd269f8..86913461d44 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt @@ -1,3 +1,12 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(7,8): error TS2304: Cannot find name 'A'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A': + Index signatures are incompatible: + Type 'string' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: string; }': + Index signatures are incompatible: + Type 'T' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts (3 errors) ==== // Derived type indexer must be subtype of base type indexer @@ -7,7 +16,7 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b1: { [x: string]: string; } a = b1; // error b1 = a; // error @@ -22,13 +31,13 @@ var b: { [x: string]: string; } a = b; // error ~ -!!! Type '{ [x: string]: string; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'T'. b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: string]: string; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: string; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability10.errors.txt b/tests/baselines/reference/assignmentCompatability10.errors.txt index 25f76e83c07..26ffd267ae0 100644 --- a/tests/baselines/reference/assignmentCompatability10.errors.txt +++ b/tests/baselines/reference/assignmentCompatability10.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional': + Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. + + ==== tests/cases/compiler/assignmentCompatability10.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__x4 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability11.errors.txt b/tests/baselines/reference/assignmentCompatability11.errors.txt index d56d0c3adce..1485c3abdba 100644 --- a/tests/baselines/reference/assignmentCompatability11.errors.txt +++ b/tests/baselines/reference/assignmentCompatability11.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': + Types of property 'two' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/assignmentCompatability11.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,6 +14,6 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability12.errors.txt b/tests/baselines/reference/assignmentCompatability12.errors.txt index af8b57365b4..4a0f9cc8f65 100644 --- a/tests/baselines/reference/assignmentCompatability12.errors.txt +++ b/tests/baselines/reference/assignmentCompatability12.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/assignmentCompatability12.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,6 +14,6 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability13.errors.txt b/tests/baselines/reference/assignmentCompatability13.errors.txt index 5cdfab0b13c..bb87c724314 100644 --- a/tests/baselines/reference/assignmentCompatability13.errors.txt +++ b/tests/baselines/reference/assignmentCompatability13.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': + Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. + + ==== tests/cases/compiler/assignmentCompatability13.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability14.errors.txt b/tests/baselines/reference/assignmentCompatability14.errors.txt index 96b23b20dd5..897f73b8710 100644 --- a/tests/baselines/reference/assignmentCompatability14.errors.txt +++ b/tests/baselines/reference/assignmentCompatability14.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'boolean'. + + ==== tests/cases/compiler/assignmentCompatability14.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,6 +14,6 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability15.errors.txt b/tests/baselines/reference/assignmentCompatability15.errors.txt index 962b87624ba..f92f3a7ffd7 100644 --- a/tests/baselines/reference/assignmentCompatability15.errors.txt +++ b/tests/baselines/reference/assignmentCompatability15.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }': + Types of property 'two' are incompatible: + Type 'string' is not assignable to type 'boolean'. + + ==== tests/cases/compiler/assignmentCompatability15.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,6 +14,6 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability16.errors.txt b/tests/baselines/reference/assignmentCompatability16.errors.txt index 0e8b5b045a6..b114462c711 100644 --- a/tests/baselines/reference/assignmentCompatability16.errors.txt +++ b/tests/baselines/reference/assignmentCompatability16.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'any[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/assignmentCompatability16.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability17.errors.txt b/tests/baselines/reference/assignmentCompatability17.errors.txt index ddf7bddabf8..f30e39de1ae 100644 --- a/tests/baselines/reference/assignmentCompatability17.errors.txt +++ b/tests/baselines/reference/assignmentCompatability17.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }': + Types of property 'two' are incompatible: + Type 'string' is not assignable to type 'any[]': + Property 'push' is missing in type 'String'. + + ==== tests/cases/compiler/assignmentCompatability17.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'any[]': -!!! Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability18.errors.txt b/tests/baselines/reference/assignmentCompatability18.errors.txt index 26f5fa6ede1..d619b4847ad 100644 --- a/tests/baselines/reference/assignmentCompatability18.errors.txt +++ b/tests/baselines/reference/assignmentCompatability18.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'number[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/assignmentCompatability18.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'number[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'number[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability19.errors.txt b/tests/baselines/reference/assignmentCompatability19.errors.txt index cdfcf84aae9..1c61c2bc808 100644 --- a/tests/baselines/reference/assignmentCompatability19.errors.txt +++ b/tests/baselines/reference/assignmentCompatability19.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }': + Types of property 'two' are incompatible: + Type 'string' is not assignable to type 'number[]': + Property 'push' is missing in type 'String'. + + ==== tests/cases/compiler/assignmentCompatability19.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'number[]': -!!! Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number[]': +!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability20.errors.txt b/tests/baselines/reference/assignmentCompatability20.errors.txt index 0a198da5523..b9d966a09a5 100644 --- a/tests/baselines/reference/assignmentCompatability20.errors.txt +++ b/tests/baselines/reference/assignmentCompatability20.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'string[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/assignmentCompatability20.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability21.errors.txt b/tests/baselines/reference/assignmentCompatability21.errors.txt index e8785413e05..72a690c5d16 100644 --- a/tests/baselines/reference/assignmentCompatability21.errors.txt +++ b/tests/baselines/reference/assignmentCompatability21.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }': + Types of property 'two' are incompatible: + Type 'string' is not assignable to type 'string[]': + Property 'push' is missing in type 'String'. + + ==== tests/cases/compiler/assignmentCompatability21.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'string[]': -!!! Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'string[]': +!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability22.errors.txt b/tests/baselines/reference/assignmentCompatability22.errors.txt index 6497d477102..b033522049d 100644 --- a/tests/baselines/reference/assignmentCompatability22.errors.txt +++ b/tests/baselines/reference/assignmentCompatability22.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'boolean[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/assignmentCompatability22.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'boolean[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability23.errors.txt b/tests/baselines/reference/assignmentCompatability23.errors.txt index 88f13a2ffc2..f50d2ba943e 100644 --- a/tests/baselines/reference/assignmentCompatability23.errors.txt +++ b/tests/baselines/reference/assignmentCompatability23.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }': + Types of property 'two' are incompatible: + Type 'string' is not assignable to type 'boolean[]': + Property 'push' is missing in type 'String'. + + ==== tests/cases/compiler/assignmentCompatability23.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'boolean[]': -!!! Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'boolean[]': +!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability24.errors.txt b/tests/baselines/reference/assignmentCompatability24.errors.txt index 70a6717b9b7..14cd2eb41d4 100644 --- a/tests/baselines/reference/assignmentCompatability24.errors.txt +++ b/tests/baselines/reference/assignmentCompatability24.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. + + ==== tests/cases/compiler/assignmentCompatability24.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,4 +12,4 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability25.errors.txt b/tests/baselines/reference/assignmentCompatability25.errors.txt index bc3de672ea2..c02b876e4e0 100644 --- a/tests/baselines/reference/assignmentCompatability25.errors.txt +++ b/tests/baselines/reference/assignmentCompatability25.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': + Types of property 'two' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/assignmentCompatability25.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,6 +14,6 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability26.errors.txt b/tests/baselines/reference/assignmentCompatability26.errors.txt index 771ae72eb41..253c8af2c16 100644 --- a/tests/baselines/reference/assignmentCompatability26.errors.txt +++ b/tests/baselines/reference/assignmentCompatability26.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/assignmentCompatability26.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,6 +14,6 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability27.errors.txt b/tests/baselines/reference/assignmentCompatability27.errors.txt index 26948fe97ea..16870b191b3 100644 --- a/tests/baselines/reference/assignmentCompatability27.errors.txt +++ b/tests/baselines/reference/assignmentCompatability27.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': + Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. + + ==== tests/cases/compiler/assignmentCompatability27.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability28.errors.txt b/tests/baselines/reference/assignmentCompatability28.errors.txt index 2b50a9b3596..ce604747051 100644 --- a/tests/baselines/reference/assignmentCompatability28.errors.txt +++ b/tests/baselines/reference/assignmentCompatability28.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'boolean'. + + ==== tests/cases/compiler/assignmentCompatability28.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,6 +14,6 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability29.errors.txt b/tests/baselines/reference/assignmentCompatability29.errors.txt index 937d5112007..fe9e390b482 100644 --- a/tests/baselines/reference/assignmentCompatability29.errors.txt +++ b/tests/baselines/reference/assignmentCompatability29.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'any[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/assignmentCompatability29.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability30.errors.txt b/tests/baselines/reference/assignmentCompatability30.errors.txt index 08a8b313d30..663d8eaa299 100644 --- a/tests/baselines/reference/assignmentCompatability30.errors.txt +++ b/tests/baselines/reference/assignmentCompatability30.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'number[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/assignmentCompatability30.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'number[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'number[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability31.errors.txt b/tests/baselines/reference/assignmentCompatability31.errors.txt index c620198e2ac..00d5dd59188 100644 --- a/tests/baselines/reference/assignmentCompatability31.errors.txt +++ b/tests/baselines/reference/assignmentCompatability31.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'string[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/assignmentCompatability31.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability32.errors.txt b/tests/baselines/reference/assignmentCompatability32.errors.txt index a20461b25bd..c4f20881a44 100644 --- a/tests/baselines/reference/assignmentCompatability32.errors.txt +++ b/tests/baselines/reference/assignmentCompatability32.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'boolean[]': + Property 'length' is missing in type 'Number'. + + ==== tests/cases/compiler/assignmentCompatability32.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,7 +15,7 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'boolean[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability33.errors.txt b/tests/baselines/reference/assignmentCompatability33.errors.txt index 3f9f4716f81..27a87764b61 100644 --- a/tests/baselines/reference/assignmentCompatability33.errors.txt +++ b/tests/baselines/reference/assignmentCompatability33.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. + + ==== tests/cases/compiler/assignmentCompatability33.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,4 +12,4 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability34.errors.txt b/tests/baselines/reference/assignmentCompatability34.errors.txt index 1ae98d98d37..9ac0a97011c 100644 --- a/tests/baselines/reference/assignmentCompatability34.errors.txt +++ b/tests/baselines/reference/assignmentCompatability34.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. + + ==== tests/cases/compiler/assignmentCompatability34.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,4 +12,4 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability35.errors.txt b/tests/baselines/reference/assignmentCompatability35.errors.txt index ac6c09a8bec..4ae2aaf42d8 100644 --- a/tests/baselines/reference/assignmentCompatability35.errors.txt +++ b/tests/baselines/reference/assignmentCompatability35.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }': + Index signature is missing in type 'interfaceWithPublicAndOptional'. + + ==== tests/cases/compiler/assignmentCompatability35.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }': -!!! Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }': +!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability36.errors.txt b/tests/baselines/reference/assignmentCompatability36.errors.txt index acf5aa5344e..013f5ae33b6 100644 --- a/tests/baselines/reference/assignmentCompatability36.errors.txt +++ b/tests/baselines/reference/assignmentCompatability36.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }': + Index signature is missing in type 'interfaceWithPublicAndOptional'. + + ==== tests/cases/compiler/assignmentCompatability36.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }': -!!! Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }': +!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability37.errors.txt b/tests/baselines/reference/assignmentCompatability37.errors.txt index f097e9664d3..7ce5905816b 100644 --- a/tests/baselines/reference/assignmentCompatability37.errors.txt +++ b/tests/baselines/reference/assignmentCompatability37.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. + + ==== tests/cases/compiler/assignmentCompatability37.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,4 +12,4 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability38.errors.txt b/tests/baselines/reference/assignmentCompatability38.errors.txt index 9efa19b0338..d23685d9f99 100644 --- a/tests/baselines/reference/assignmentCompatability38.errors.txt +++ b/tests/baselines/reference/assignmentCompatability38.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. + + ==== tests/cases/compiler/assignmentCompatability38.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,4 +12,4 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability39.errors.txt b/tests/baselines/reference/assignmentCompatability39.errors.txt index f924512d461..c89b63405d1 100644 --- a/tests/baselines/reference/assignmentCompatability39.errors.txt +++ b/tests/baselines/reference/assignmentCompatability39.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic': + Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. + + ==== tests/cases/compiler/assignmentCompatability39.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__x2 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability40.errors.txt b/tests/baselines/reference/assignmentCompatability40.errors.txt index db1948d7cb0..b6e47c23b94 100644 --- a/tests/baselines/reference/assignmentCompatability40.errors.txt +++ b/tests/baselines/reference/assignmentCompatability40.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate': + Private property 'one' cannot be reimplemented. + + ==== tests/cases/compiler/assignmentCompatability40.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__x5 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate': -!!! Private property 'one' cannot be reimplemented. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate': +!!! error TS2322: Private property 'one' cannot be reimplemented. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability41.errors.txt b/tests/baselines/reference/assignmentCompatability41.errors.txt index e21dc1c8cd3..535b52fe62c 100644 --- a/tests/baselines/reference/assignmentCompatability41.errors.txt +++ b/tests/baselines/reference/assignmentCompatability41.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate': + Private property 'one' cannot be reimplemented. + + ==== tests/cases/compiler/assignmentCompatability41.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__x6 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate': -!!! Private property 'one' cannot be reimplemented. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate': +!!! error TS2322: Private property 'one' cannot be reimplemented. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability42.errors.txt b/tests/baselines/reference/assignmentCompatability42.errors.txt index 2258a85139e..2fe4689bac2 100644 --- a/tests/baselines/reference/assignmentCompatability42.errors.txt +++ b/tests/baselines/reference/assignmentCompatability42.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate': + Private property 'two' cannot be reimplemented. + + ==== tests/cases/compiler/assignmentCompatability42.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__x7 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate': -!!! Private property 'two' cannot be reimplemented. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate': +!!! error TS2322: Private property 'two' cannot be reimplemented. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability43.errors.txt b/tests/baselines/reference/assignmentCompatability43.errors.txt index 1ab4e3dcef8..6be9f267ac4 100644 --- a/tests/baselines/reference/assignmentCompatability43.errors.txt +++ b/tests/baselines/reference/assignmentCompatability43.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo': + Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. + + ==== tests/cases/compiler/assignmentCompatability43.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -9,5 +13,5 @@ } __test2__.__val__obj2 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt index fdb719715eb..3c6f6c72b55 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt @@ -1,3 +1,18 @@ +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Applicable': + Property 'apply' is missing in type 'String'. +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Applicable': + Property 'apply' is missing in type 'string[]'. +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Applicable': + Property 'apply' is missing in type 'Number'. +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Applicable': + Property 'apply' is missing in type '{}'. +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'. +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(24,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Applicable'. +tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(25,4): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Applicable'. + Property 'apply' is missing in type '{}'. + + ==== tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts (8 errors) ==== // 3.8.4 Assignment Compatibility @@ -10,20 +25,20 @@ // Should fail x = ''; ~ -!!! Type 'string' is not assignable to type 'Applicable': -!!! Property 'apply' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type 'Applicable': +!!! error TS2322: Property 'apply' is missing in type 'String'. x = ['']; ~ -!!! Type 'string[]' is not assignable to type 'Applicable': -!!! Property 'apply' is missing in type 'string[]'. +!!! error TS2322: Type 'string[]' is not assignable to type 'Applicable': +!!! error TS2322: Property 'apply' is missing in type 'string[]'. x = 4; ~ -!!! Type 'number' is not assignable to type 'Applicable': -!!! Property 'apply' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Applicable': +!!! error TS2322: Property 'apply' is missing in type 'Number'. x = {}; ~ -!!! Type '{}' is not assignable to type 'Applicable': -!!! Property 'apply' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'Applicable': +!!! error TS2322: Property 'apply' is missing in type '{}'. // Should work function f() { }; @@ -34,17 +49,17 @@ // Should Fail fn(''); ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'. fn(['']); ~~~~ -!!! Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. fn(4); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Applicable'. fn({}); ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'Applicable'. -!!! Property 'apply' is missing in type '{}'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Property 'apply' is missing in type '{}'. // Should work diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt index 91c3cee4293..ab9b4985cc2 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt @@ -1,3 +1,18 @@ +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Callable': + Property 'call' is missing in type 'String'. +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Callable': + Property 'call' is missing in type 'string[]'. +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Callable': + Property 'call' is missing in type 'Number'. +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Callable': + Property 'call' is missing in type '{}'. +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'. +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'. +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(24,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Callable'. +tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(25,4): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Callable'. + Property 'call' is missing in type '{}'. + + ==== tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts (8 errors) ==== // 3.8.4 Assignment Compatibility @@ -10,20 +25,20 @@ // Should fail x = ''; ~ -!!! Type 'string' is not assignable to type 'Callable': -!!! Property 'call' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type 'Callable': +!!! error TS2322: Property 'call' is missing in type 'String'. x = ['']; ~ -!!! Type 'string[]' is not assignable to type 'Callable': -!!! Property 'call' is missing in type 'string[]'. +!!! error TS2322: Type 'string[]' is not assignable to type 'Callable': +!!! error TS2322: Property 'call' is missing in type 'string[]'. x = 4; ~ -!!! Type 'number' is not assignable to type 'Callable': -!!! Property 'call' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Callable': +!!! error TS2322: Property 'call' is missing in type 'Number'. x = {}; ~ -!!! Type '{}' is not assignable to type 'Callable': -!!! Property 'call' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'Callable': +!!! error TS2322: Property 'call' is missing in type '{}'. // Should work function f() { }; @@ -34,17 +49,17 @@ // Should Fail fn(''); ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'. fn(['']); ~~~~ -!!! Argument of type 'string[]' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'. fn(4); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Callable'. fn({}); ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'Callable'. -!!! Property 'call' is missing in type '{}'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Property 'call' is missing in type '{}'. // Should work diff --git a/tests/baselines/reference/assignmentLHSIsValue.errors.txt b/tests/baselines/reference/assignmentLHSIsValue.errors.txt index 90e6a7e3dc2..2f65b368532 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/assignmentLHSIsValue.errors.txt @@ -1,3 +1,45 @@ +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(35,9): error TS1128: Declaration or statement expected. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(42,36): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(44,19): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(46,27): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(50,20): error TS1128: Declaration or statement expected. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(51,11): error TS1005: ';' expected. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(6,21): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7,13): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(8,21): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(11,18): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(13,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(19,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(22,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(24,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(27,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(28,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(29,1): error TS2364: Invalid left-hand side of assignment expression. +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(38,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(42,30): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(44,13): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(46,21): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(54,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(57,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(58,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(59,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(60,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(61,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(62,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(63,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(64,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(65,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(66,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(67,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(68,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(69,1): error TS2364: Invalid left-hand side of assignment expression. +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 (40 errors) ==== // expected error for all the LHS of assignments var value; @@ -6,146 +48,146 @@ class C { constructor() { this = value; } ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. foo() { this = value; } ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. static sfoo() { this = value; } ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } function foo() { this = value; } ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. this = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // identifiers: module, class, enum, function module M { export var a; } M = value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. C = value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. enum E { } E = value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. foo = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // literals null = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. true = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. false = value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. 0 = value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. '' = value; ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. /d+/ = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // object literals { a: 0} = value; ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. // array literals ['', ''] = value; ~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // super class Derived extends C { constructor() { super(); super = value; } ~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. foo() { super = value } ~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. static sfoo() { super = value; } ~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } // function expression function bar() { } = value; ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. () => { } = value; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // function calls foo() = value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // parentheses, the containted expression is value (this) = value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (M) = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (C) = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (E) = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (foo) = value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (null) = value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (true) = value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (0) = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ('') = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (/d+/) = value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ({}) = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ([]) = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (function baz() { }) = value; ~~~~~~~~~~~~~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (foo()) = value; ~~~~~~~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentStricterConstraints.errors.txt b/tests/baselines/reference/assignmentStricterConstraints.errors.txt index 37b4de1bfa5..f5234a44fd1 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.errors.txt +++ b/tests/baselines/reference/assignmentStricterConstraints.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/assignmentStricterConstraints.ts(1,22): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/assignmentStricterConstraints.ts(2,5): error TS2323: Type 'S' is not assignable to type 'T'. + + ==== tests/cases/compiler/assignmentStricterConstraints.ts (2 errors) ==== var f = function (x: T, y: S): void { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y ~ -!!! Type 'S' is not assignable to type 'T'. +!!! error TS2323: Type 'S' is not assignable to type 'T'. } var g = function (x: T, y: S): void { } diff --git a/tests/baselines/reference/assignmentToFunction.errors.txt b/tests/baselines/reference/assignmentToFunction.errors.txt index 0e5d9351f29..b9a2f1f2675 100644 --- a/tests/baselines/reference/assignmentToFunction.errors.txt +++ b/tests/baselines/reference/assignmentToFunction.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/assignmentToFunction.ts(2,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/compiler/assignmentToFunction.ts(8,9): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/compiler/assignmentToFunction.ts (2 errors) ==== function fn() { } fn = () => 3; ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. module foo { function xyz() { @@ -10,6 +14,6 @@ } bar = null; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToObject.errors.txt b/tests/baselines/reference/assignmentToObject.errors.txt index 13f7725ff38..bfb270b71b6 100644 --- a/tests/baselines/reference/assignmentToObject.errors.txt +++ b/tests/baselines/reference/assignmentToObject.errors.txt @@ -1,9 +1,14 @@ +tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object': + Types of property 'toString' are incompatible: + Type 'number' is not assignable to type '() => string'. + + ==== tests/cases/compiler/assignmentToObject.ts (1 errors) ==== var a = { toString: 5 }; var b: {} = a; // ok var c: Object = a; // should be error ~ -!!! Type '{ toString: number; }' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type 'number' is not assignable to type '() => string'. +!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type '() => string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt index fb5aeac1bca..c6ba4e7dfe3 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt +++ b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt @@ -1,9 +1,19 @@ +tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object': + Types of property 'toString' are incompatible: + Type 'number' is not assignable to type '() => string'. +tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2322: Type '{}' is not assignable to type 'Function': + Property 'apply' is missing in type '{}'. +tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not assignable to type 'Function': + Types of property 'apply' are incompatible: + Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'. + + ==== tests/cases/compiler/assignmentToObjectAndFunction.ts (3 errors) ==== var errObj: Object = { toString: 0 }; // Error, incompatible toString ~~~~~~ -!!! Type '{ toString: number; }' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type 'number' is not assignable to type '() => string'. +!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type '() => string'. var goodObj: Object = { toString(x?) { return ""; @@ -12,8 +22,8 @@ var errFun: Function = {}; // Error for no call signature ~~~~~~ -!!! Type '{}' is not assignable to type 'Function': -!!! Property 'apply' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'Function': +!!! error TS2322: Property 'apply' is missing in type '{}'. function foo() { } module foo { @@ -36,6 +46,6 @@ var badFundule: Function = bad; // error ~~~~~~~~~~ -!!! Type 'typeof bad' is not assignable to type 'Function': -!!! Types of property 'apply' are incompatible: -!!! Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'. \ No newline at end of file +!!! error TS2322: Type 'typeof bad' is not assignable to type 'Function': +!!! error TS2322: Types of property 'apply' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt b/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt index 3d56ed9d18b..0b1b1e04de8 100644 --- a/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/assignmentToParenthesizedExpression1.ts(2,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/compiler/assignmentToParenthesizedExpression1.ts (1 errors) ==== var x; (1, x)=0; ~~~~~~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt index 95e9d44ee4d..070b5497121 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt @@ -1,13 +1,45 @@ +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(4,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(5,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(13,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(14,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(15,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(44,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(48,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(49,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(54,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(55,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(56,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(62,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(63,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(69,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(70,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (24 errors) ==== var x: number; x = 3; // OK (x) = 3; // OK x = ''; // Error ~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (x) = ''; // Error ~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. module M { export var y: number; @@ -17,20 +49,20 @@ (M.y) = 3; // OK M.y = ''; // Error ~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (M).y = ''; // Error ~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (M.y) = ''; // Error ~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. M = { y: 3 }; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (M) = { y: 3 }; // Error ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. module M2 { export module M3 { @@ -39,7 +71,7 @@ M3 = { x: 3 }; // Error ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } M2.M3 = { x: 3 }; // OK (M2).M3 = { x: 3 }; // OK @@ -47,60 +79,60 @@ M2.M3 = { x: '' }; // Error ~~~~~ -!!! Type '{ x: string; }' is not assignable to type 'typeof M3': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. (M2).M3 = { x: '' }; // Error ~~~~~~~ -!!! Type '{ x: string; }' is not assignable to type 'typeof M3': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. (M2.M3) = { x: '' }; // Error ~~~~~~~ -!!! Type '{ x: string; }' is not assignable to type 'typeof M3': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. function fn() { } fn = () => 3; // Bug 823548: Should be error (fn is not a reference) ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (fn) = () => 3; // Should be error ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function fn2(x: number, y: { t: number }) { x = 3; (x) = 3; // OK x = ''; // Error ~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (x) = ''; // Error ~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (y).t = 3; // OK (y.t) = 3; // OK (y).t = ''; // Error ~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (y.t) = ''; // Error ~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. y['t'] = 3; // OK (y)['t'] = 3; // OK (y['t']) = 3; // OK y['t'] = ''; // Error ~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (y)['t'] = ''; // Error ~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (y['t']) = ''; // Error ~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. } enum E { @@ -108,10 +140,10 @@ } E = undefined; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (E) = undefined; // Error ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. class C { @@ -119,8 +151,8 @@ C = undefined; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (C) = undefined; // Error ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToReferenceTypes.errors.txt b/tests/baselines/reference/assignmentToReferenceTypes.errors.txt index b67b5b075e4..56d6adc4149 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.errors.txt +++ b/tests/baselines/reference/assignmentToReferenceTypes.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/assignmentToReferenceTypes.ts(5,1): error TS2304: Cannot find name 'M'. +tests/cases/compiler/assignmentToReferenceTypes.ts(9,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/compiler/assignmentToReferenceTypes.ts(13,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/compiler/assignmentToReferenceTypes.ts(16,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/compiler/assignmentToReferenceTypes.ts (4 errors) ==== // Should all be allowed @@ -5,24 +11,24 @@ } M = null; ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. class C { } C = null; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. enum E { } E = null; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function f() { } f = null; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. var x = 1; x = null; diff --git a/tests/baselines/reference/assignments.errors.txt b/tests/baselines/reference/assignments.errors.txt index 5671c58d5b2..9f89863f31f 100644 --- a/tests/baselines/reference/assignments.errors.txt +++ b/tests/baselines/reference/assignments.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(11,1): error TS2304: Cannot find name 'M'. +tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(14,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): error TS2304: Cannot find name 'I'. + + ==== tests/cases/conformance/expressions/valuesAndReferences/assignments.ts (6 errors) ==== // In this file: // Assign to a module @@ -11,25 +19,25 @@ module M { } M = null; // Error ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. class C { } C = null; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. enum E { A } E = null; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. E.A = null; // OK per spec, Error per implementation (509581) ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function fn() { } fn = null; // Should be error ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. var v; v = null; // OK @@ -41,4 +49,4 @@ interface I { } I = null; // Error ~ -!!! Cannot find name 'I'. \ No newline at end of file +!!! error TS2304: Cannot find name 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt index 96306db9e3d..bc83e3e4dfa 100644 --- a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt +++ b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts(3,9): error TS2300: Duplicate identifier 'prototype'. + + ==== tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts (1 errors) ==== declare module m { var f; var prototype; // This should be error since prototype would be static property on class m ~~~~~~~~~ -!!! Duplicate identifier 'prototype'. +!!! error TS2300: Duplicate identifier 'prototype'. } declare class m { } \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt index 4222ab54b15..2c165c2395c 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }': + Index signature is missing in type '{}'. +tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }': + Index signature is missing in type '() => void'. + + ==== tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts (2 errors) ==== interface Foo { a } interface Bar { b } @@ -15,14 +21,14 @@ var v1: { ~~ -!!! Type '{}' is not assignable to type '{ [x: number]: Foo; }': -!!! Index signature is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }': +!!! error TS2322: Index signature is missing in type '{}'. [n: number]: Foo } = o; // Should be allowed var v2: { ~~ -!!! Type '() => void' is not assignable to type '{ [x: number]: Bar; }': -!!! Index signature is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }': +!!! error TS2322: Index signature is missing in type '() => void'. [n: number]: Bar } = f; // Should be allowed \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass.errors.txt b/tests/baselines/reference/augmentedTypesClass.errors.txt index ee05d113767..16faa14b4c2 100644 --- a/tests/baselines/reference/augmentedTypesClass.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/augmentedTypesClass.ts(3,5): error TS2300: Duplicate identifier 'c1'. +tests/cases/compiler/augmentedTypesClass.ts(7,6): error TS2300: Duplicate identifier 'c4'. + + ==== tests/cases/compiler/augmentedTypesClass.ts (2 errors) ==== //// class then var class c1 { public foo() { } } var c1 = 1; // error ~~ -!!! Duplicate identifier 'c1'. +!!! error TS2300: Duplicate identifier 'c1'. //// class then enum class c4 { public foo() { } } enum c4 { One } // error ~~ -!!! Duplicate identifier 'c4'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'c4'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass2.errors.txt b/tests/baselines/reference/augmentedTypesClass2.errors.txt index 7216ac604c7..32104b65ac5 100644 --- a/tests/baselines/reference/augmentedTypesClass2.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/augmentedTypesClass2.ts(10,11): error TS2300: Duplicate identifier 'c11'. +tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate identifier 'c33'. + + ==== tests/cases/compiler/augmentedTypesClass2.ts (2 errors) ==== // Checking class with other things in type space not value space @@ -10,7 +14,7 @@ interface c11 { // error ~~~ -!!! Duplicate identifier 'c11'. +!!! error TS2300: Duplicate identifier 'c11'. bar(): void; } @@ -23,7 +27,7 @@ } enum c33 { One }; ~~~ -!!! Duplicate identifier 'c33'. +!!! error TS2300: Duplicate identifier 'c33'. // class then import class c44 { diff --git a/tests/baselines/reference/augmentedTypesClass2a.errors.txt b/tests/baselines/reference/augmentedTypesClass2a.errors.txt index 16edf2fb577..74dece080a6 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2a.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/augmentedTypesClass2a.ts(3,10): error TS2300: Duplicate identifier 'c2'. +tests/cases/compiler/augmentedTypesClass2a.ts(4,5): error TS2300: Duplicate identifier 'c2'. + + ==== tests/cases/compiler/augmentedTypesClass2a.ts (2 errors) ==== //// class then function class c2 { public foo() { } } function c2() { } // error ~~ -!!! Duplicate identifier 'c2'. +!!! error TS2300: Duplicate identifier 'c2'. var c2 = () => { } ~~ -!!! Duplicate identifier 'c2'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'c2'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass4.errors.txt b/tests/baselines/reference/augmentedTypesClass4.errors.txt index f909cd9c266..2df0a95ccd2 100644 --- a/tests/baselines/reference/augmentedTypesClass4.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass4.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/augmentedTypesClass4.ts(3,7): error TS2300: Duplicate identifier 'c3'. + + ==== tests/cases/compiler/augmentedTypesClass4.ts (1 errors) ==== //// class then class class c3 { public foo() { } } class c3 { public bar() { } } // error ~~ -!!! Duplicate identifier 'c3'. +!!! error TS2300: Duplicate identifier 'c3'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesEnum.errors.txt b/tests/baselines/reference/augmentedTypesEnum.errors.txt index d888f170b5d..374ca14093b 100644 --- a/tests/baselines/reference/augmentedTypesEnum.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum.errors.txt @@ -1,39 +1,48 @@ +tests/cases/compiler/augmentedTypesEnum.ts(3,5): error TS2300: Duplicate identifier 'e1111'. +tests/cases/compiler/augmentedTypesEnum.ts(7,10): error TS2300: Duplicate identifier 'e2'. +tests/cases/compiler/augmentedTypesEnum.ts(10,5): error TS2300: Duplicate identifier 'e3'. +tests/cases/compiler/augmentedTypesEnum.ts(14,7): error TS2300: Duplicate identifier 'e4'. +tests/cases/compiler/augmentedTypesEnum.ts(18,11): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +tests/cases/compiler/augmentedTypesEnum.ts(21,12): error TS2300: Duplicate identifier 'One'. +tests/cases/compiler/augmentedTypesEnum.ts(21,12): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + ==== tests/cases/compiler/augmentedTypesEnum.ts (7 errors) ==== // enum then var enum e1111 { One } var e1111 = 1; // error ~~~~~ -!!! Duplicate identifier 'e1111'. +!!! error TS2300: Duplicate identifier 'e1111'. // enum then function enum e2 { One } function e2() { } // error ~~ -!!! Duplicate identifier 'e2'. +!!! error TS2300: Duplicate identifier 'e2'. enum e3 { One } var e3 = () => { } // error ~~ -!!! Duplicate identifier 'e3'. +!!! error TS2300: Duplicate identifier 'e3'. // enum then class enum e4 { One } class e4 { public foo() { } } // error ~~ -!!! Duplicate identifier 'e4'. +!!! error TS2300: Duplicate identifier 'e4'. // enum then enum enum e5 { One } enum e5 { Two } ~~~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. enum e5a { One } enum e5a { One } // error ~~~ -!!! Duplicate identifier 'One'. +!!! error TS2300: Duplicate identifier 'One'. ~~~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. // enum then internal module enum e6 { One } diff --git a/tests/baselines/reference/augmentedTypesEnum2.errors.txt b/tests/baselines/reference/augmentedTypesEnum2.errors.txt index 06581cf182c..86e155f8772 100644 --- a/tests/baselines/reference/augmentedTypesEnum2.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum2.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/augmentedTypesEnum2.ts(4,11): error TS2300: Duplicate identifier 'e1'. +tests/cases/compiler/augmentedTypesEnum2.ts(12,7): error TS2300: Duplicate identifier 'e2'. + + ==== tests/cases/compiler/augmentedTypesEnum2.ts (2 errors) ==== // enum then interface enum e1 { One } interface e1 { ~~ -!!! Duplicate identifier 'e1'. +!!! error TS2300: Duplicate identifier 'e1'. foo(): void; } @@ -14,7 +18,7 @@ enum e2 { One }; class e2 { // error ~~ -!!! Duplicate identifier 'e2'. +!!! error TS2300: Duplicate identifier 'e2'. foo() { return 1; } diff --git a/tests/baselines/reference/augmentedTypesEnum3.errors.txt b/tests/baselines/reference/augmentedTypesEnum3.errors.txt index c9e7bca61d4..9ec4f4d81c5 100644 --- a/tests/baselines/reference/augmentedTypesEnum3.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/augmentedTypesEnum3.ts(16,5): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + ==== tests/cases/compiler/augmentedTypesEnum3.ts (1 errors) ==== module E { var t; @@ -16,7 +19,7 @@ enum A { c ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } module A { var p; diff --git a/tests/baselines/reference/augmentedTypesFunction.errors.txt b/tests/baselines/reference/augmentedTypesFunction.errors.txt index ab42d79d8f7..ba324349c65 100644 --- a/tests/baselines/reference/augmentedTypesFunction.errors.txt +++ b/tests/baselines/reference/augmentedTypesFunction.errors.txt @@ -1,37 +1,45 @@ +tests/cases/compiler/augmentedTypesFunction.ts(3,5): error TS2300: Duplicate identifier 'y1'. +tests/cases/compiler/augmentedTypesFunction.ts(7,1): error TS2393: Duplicate function implementation. +tests/cases/compiler/augmentedTypesFunction.ts(10,5): error TS2300: Duplicate identifier 'y2a'. +tests/cases/compiler/augmentedTypesFunction.ts(14,7): error TS2300: Duplicate identifier 'y3'. +tests/cases/compiler/augmentedTypesFunction.ts(17,7): error TS2300: Duplicate identifier 'y3a'. +tests/cases/compiler/augmentedTypesFunction.ts(21,6): error TS2300: Duplicate identifier 'y4'. + + ==== tests/cases/compiler/augmentedTypesFunction.ts (6 errors) ==== // function then var function y1() { } var y1 = 1; // error ~~ -!!! Duplicate identifier 'y1'. +!!! error TS2300: Duplicate identifier 'y1'. // function then function function y2() { } function y2() { } // error ~~~~~~~~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. function y2a() { } var y2a = () => { } // error ~~~ -!!! Duplicate identifier 'y2a'. +!!! error TS2300: Duplicate identifier 'y2a'. // function then class function y3() { } class y3 { } // error ~~ -!!! Duplicate identifier 'y3'. +!!! error TS2300: Duplicate identifier 'y3'. function y3a() { } class y3a { public foo() { } } // error ~~~ -!!! Duplicate identifier 'y3a'. +!!! error TS2300: Duplicate identifier 'y3a'. // function then enum function y4() { } enum y4 { One } // error ~~ -!!! Duplicate identifier 'y4'. +!!! error TS2300: Duplicate identifier 'y4'. // function then internal module function y5() { } diff --git a/tests/baselines/reference/augmentedTypesInterface.errors.txt b/tests/baselines/reference/augmentedTypesInterface.errors.txt index e26c2648c32..77a7fa64eed 100644 --- a/tests/baselines/reference/augmentedTypesInterface.errors.txt +++ b/tests/baselines/reference/augmentedTypesInterface.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/augmentedTypesInterface.ts(16,7): error TS2300: Duplicate identifier 'i2'. +tests/cases/compiler/augmentedTypesInterface.ts(26,6): error TS2300: Duplicate identifier 'i3'. + + ==== tests/cases/compiler/augmentedTypesInterface.ts (2 errors) ==== // interface then interface @@ -16,7 +20,7 @@ class i2 { // error ~~ -!!! Duplicate identifier 'i2'. +!!! error TS2300: Duplicate identifier 'i2'. bar() { return 1; } @@ -28,7 +32,7 @@ } enum i3 { One }; // error ~~ -!!! Duplicate identifier 'i3'. +!!! error TS2300: Duplicate identifier 'i3'. // interface then import interface i4 { diff --git a/tests/baselines/reference/augmentedTypesModules.errors.txt b/tests/baselines/reference/augmentedTypesModules.errors.txt index 6975ee37159..75b1973525d 100644 --- a/tests/baselines/reference/augmentedTypesModules.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/augmentedTypesModules.ts(6,5): error TS2300: Duplicate identifier 'm1a'. +tests/cases/compiler/augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'. +tests/cases/compiler/augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'. +tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged + + ==== tests/cases/compiler/augmentedTypesModules.ts (6 errors) ==== // module then var module m1 { } @@ -6,12 +14,12 @@ module m1a { var y = 2; } var m1a = 1; ~~~ -!!! Duplicate identifier 'm1a'. +!!! error TS2300: Duplicate identifier 'm1a'. module m1b { export var y = 2; } var m1b = 1; ~~~ -!!! Duplicate identifier 'm1b'. +!!! error TS2300: Duplicate identifier 'm1b'. module m1c { export interface I { foo(): void; } @@ -23,7 +31,7 @@ } var m1d = 1; // error ~~~ -!!! Duplicate identifier 'm1d'. +!!! error TS2300: Duplicate identifier 'm1d'. // module then function module m2 { } @@ -31,12 +39,12 @@ module m2a { var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2b() { }; // error since the module is instantiated // should be errors to have function first @@ -61,7 +69,7 @@ module m3a { var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged class m3a { foo() { } } // error, class isn't ambient or declared before the module class m3b { foo() { } } diff --git a/tests/baselines/reference/augmentedTypesModules2.errors.txt b/tests/baselines/reference/augmentedTypesModules2.errors.txt index e25682fa39e..19c87a14913 100644 --- a/tests/baselines/reference/augmentedTypesModules2.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules2.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged + + ==== tests/cases/compiler/augmentedTypesModules2.ts (3 errors) ==== // module then function module m2 { } @@ -5,12 +10,12 @@ module m2a { var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2b() { }; // error since the module is instantiated function m2c() { }; @@ -18,7 +23,7 @@ module m2cc { export var y = 2; } ~~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2cc() { }; // error to have module first module m2d { } diff --git a/tests/baselines/reference/augmentedTypesModules3.errors.txt b/tests/baselines/reference/augmentedTypesModules3.errors.txt index aa5bc0336a4..e264c74463c 100644 --- a/tests/baselines/reference/augmentedTypesModules3.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged + + ==== tests/cases/compiler/augmentedTypesModules3.ts (1 errors) ==== //// module then class module m3 { } @@ -5,5 +8,5 @@ module m3a { var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged class m3a { foo() { } } // error, class isn't ambient or declared before the module \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesVar.errors.txt b/tests/baselines/reference/augmentedTypesVar.errors.txt index 6edbb52ec50..9f3980e39bc 100644 --- a/tests/baselines/reference/augmentedTypesVar.errors.txt +++ b/tests/baselines/reference/augmentedTypesVar.errors.txt @@ -1,3 +1,12 @@ +tests/cases/compiler/augmentedTypesVar.ts(7,10): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/augmentedTypesVar.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. +tests/cases/compiler/augmentedTypesVar.ts(14,7): error TS2300: Duplicate identifier 'x4'. +tests/cases/compiler/augmentedTypesVar.ts(17,7): error TS2300: Duplicate identifier 'x4a'. +tests/cases/compiler/augmentedTypesVar.ts(21,6): error TS2300: Duplicate identifier 'x5'. +tests/cases/compiler/augmentedTypesVar.ts(28,8): error TS2300: Duplicate identifier 'x6a'. +tests/cases/compiler/augmentedTypesVar.ts(31,8): error TS2300: Duplicate identifier 'x6b'. + + ==== tests/cases/compiler/augmentedTypesVar.ts (7 errors) ==== // var then var var x1 = 1; @@ -7,29 +16,29 @@ var x2 = 1; function x2() { } // should be an error ~~ -!!! Duplicate identifier 'x2'. +!!! error TS2300: Duplicate identifier 'x2'. var x3 = 1; var x3 = () => { } // should be an error ~~ -!!! Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. // var then class var x4 = 1; class x4 { } // error ~~ -!!! Duplicate identifier 'x4'. +!!! error TS2300: Duplicate identifier 'x4'. var x4a = 1; class x4a { public foo() { } } // error ~~~ -!!! Duplicate identifier 'x4a'. +!!! error TS2300: Duplicate identifier 'x4a'. // var then enum var x5 = 1; enum x5 { One } // error ~~ -!!! Duplicate identifier 'x5'. +!!! error TS2300: Duplicate identifier 'x5'. // var then module var x6 = 1; @@ -38,12 +47,12 @@ var x6a = 1; module x6a { var y = 2; } // error since instantiated ~~~ -!!! Duplicate identifier 'x6a'. +!!! error TS2300: Duplicate identifier 'x6a'. var x6b = 1; module x6b { export var y = 2; } // error ~~~ -!!! Duplicate identifier 'x6b'. +!!! error TS2300: Duplicate identifier 'x6b'. // var then import, messes with other error reporting //var x7 = 1; diff --git a/tests/baselines/reference/autoLift2.errors.txt b/tests/baselines/reference/autoLift2.errors.txt index 6f62c8e9e4b..dbe9e98cd63 100644 --- a/tests/baselines/reference/autoLift2.errors.txt +++ b/tests/baselines/reference/autoLift2.errors.txt @@ -1,3 +1,15 @@ +tests/cases/compiler/autoLift2.ts(5,17): error TS1005: ';' expected. +tests/cases/compiler/autoLift2.ts(6,17): error TS1005: ';' expected. +tests/cases/compiler/autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'. +tests/cases/compiler/autoLift2.ts(5,19): error TS2304: Cannot find name 'any'. +tests/cases/compiler/autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'. +tests/cases/compiler/autoLift2.ts(6,19): error TS2304: Cannot find name 'any'. +tests/cases/compiler/autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'. +tests/cases/compiler/autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'. +tests/cases/compiler/autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'. +tests/cases/compiler/autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'. + + ==== tests/cases/compiler/autoLift2.ts (10 errors) ==== class A @@ -5,18 +17,18 @@ constructor() { this.foo: any; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~ -!!! Property 'foo' does not exist on type 'A'. +!!! error TS2339: Property 'foo' does not exist on type 'A'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. this.bar: any; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. } @@ -24,19 +36,19 @@ this.foo = "foo"; ~~~ -!!! Property 'foo' does not exist on type 'A'. +!!! error TS2339: Property 'foo' does not exist on type 'A'. this.bar = "bar"; ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. [1, 2].forEach((p) => this.foo); ~~~ -!!! Property 'foo' does not exist on type 'A'. +!!! error TS2339: Property 'foo' does not exist on type 'A'. [1, 2].forEach((p) => this.bar); ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. } diff --git a/tests/baselines/reference/autolift3.errors.txt b/tests/baselines/reference/autolift3.errors.txt index a73368620f5..384ad498661 100644 --- a/tests/baselines/reference/autolift3.errors.txt +++ b/tests/baselines/reference/autolift3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/autolift3.ts(26,3): error TS2339: Property 'foo' does not exist on type 'B'. + + ==== tests/cases/compiler/autolift3.ts (1 errors) ==== class B { @@ -26,7 +29,7 @@ b.foo(); ~~~ -!!! Property 'foo' does not exist on type 'B'. +!!! error TS2339: Property 'foo' does not exist on type 'B'. diff --git a/tests/baselines/reference/autolift4.errors.txt b/tests/baselines/reference/autolift4.errors.txt index 9469d976c59..b548479b692 100644 --- a/tests/baselines/reference/autolift4.errors.txt +++ b/tests/baselines/reference/autolift4.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/autolift4.ts(19,70): error TS2339: Property 'm' does not exist on type 'Point3D'. + + ==== tests/cases/compiler/autolift4.ts (1 errors) ==== class Point { @@ -19,7 +22,7 @@ getDist() { return Math.sqrt(this.x*this.x + this.y*this.y + this.z*this.m); ~ -!!! Property 'm' does not exist on type 'Point3D'. +!!! error TS2339: Property 'm' does not exist on type 'Point3D'. } } diff --git a/tests/baselines/reference/badArrayIndex.errors.txt b/tests/baselines/reference/badArrayIndex.errors.txt index 71228c95e21..818870f6c26 100644 --- a/tests/baselines/reference/badArrayIndex.errors.txt +++ b/tests/baselines/reference/badArrayIndex.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/badArrayIndex.ts(1,22): error TS1109: Expression expected. +tests/cases/compiler/badArrayIndex.ts(1,15): error TS2304: Cannot find name 'number'. + + ==== tests/cases/compiler/badArrayIndex.ts (2 errors) ==== var results = number[]; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'number'. \ No newline at end of file +!!! error TS2304: Cannot find name 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/badArraySyntax.errors.txt b/tests/baselines/reference/badArraySyntax.errors.txt index 9c1edf93231..8c9bd45fba1 100644 --- a/tests/baselines/reference/badArraySyntax.errors.txt +++ b/tests/baselines/reference/badArraySyntax.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/badArraySyntax.ts(6,15): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/badArraySyntax.ts(7,15): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/badArraySyntax.ts(8,20): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/badArraySyntax.ts(9,20): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/badArraySyntax.ts(10,29): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/badArraySyntax.ts(10,40): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. + + ==== tests/cases/compiler/badArraySyntax.ts (6 errors) ==== class Z { public x = ""; @@ -6,19 +14,19 @@ var a1: Z[] = []; var a2 = new Z[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a3 = new Z[](); ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a4: Z[] = new Z[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a5: Z[] = new Z[](); ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a6: Z[][] = new Z [ ] [ ]; ~~~~~~~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. \ No newline at end of file diff --git a/tests/baselines/reference/badExternalModuleReference.errors.txt b/tests/baselines/reference/badExternalModuleReference.errors.txt index 392336db379..96ac4224222 100644 --- a/tests/baselines/reference/badExternalModuleReference.errors.txt +++ b/tests/baselines/reference/badExternalModuleReference.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find external module 'garbage'. + + ==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ==== import a1 = require("garbage"); ~~~~~~~~~ -!!! Cannot find external module 'garbage'. +!!! error TS2307: Cannot find external module 'garbage'. export declare var a: { test1: a1.connectModule; (): a1.connectExport; diff --git a/tests/baselines/reference/baseCheck.errors.txt b/tests/baselines/reference/baseCheck.errors.txt index a09491ac455..f52ba4b3dbd 100644 --- a/tests/baselines/reference/baseCheck.errors.txt +++ b/tests/baselines/reference/baseCheck.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/baseCheck.ts(9,18): error TS2304: Cannot find name 'loc'. +tests/cases/compiler/baseCheck.ts(17,53): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/baseCheck.ts(17,59): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/baseCheck.ts(18,62): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/baseCheck.ts(19,59): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/baseCheck.ts(19,68): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/baseCheck.ts(22,9): error TS2304: Cannot find name 'x'. +tests/cases/compiler/baseCheck.ts(23,7): error TS2304: Cannot find name 'x'. +tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. + + ==== tests/cases/compiler/baseCheck.ts (9 errors) ==== class C { constructor(x: number, y: number) { } } class ELoc extends C { @@ -9,7 +20,7 @@ constructor(x: number) { super(0, loc); ~~~ -!!! Cannot find name 'loc'. +!!! error TS2304: Cannot find name 'loc'. } m() { @@ -19,30 +30,30 @@ class D extends C { constructor(public z: number) { super(this.z) } } // too few params ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. class E extends C { constructor(public z: number) { super(0, this.z) } } ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type ~~~~~~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. function f() { if (x<10) { ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. x=11; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. } else { x=12; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt b/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt index eb083f30f3c..f55bca8e0e2 100644 --- a/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt +++ b/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y': + Named properties 'm' of types 'X' and 'Y' are not identical. + + ==== tests/cases/compiler/baseTypePrivateMemberClash.ts (1 errors) ==== class X { private m: number; @@ -8,5 +12,5 @@ interface Z extends X, Y { } ~ -!!! Interface 'Z' cannot simultaneously extend types 'X' and 'Y': -!!! Named properties 'm' of types 'X' and 'Y' are not identical. \ No newline at end of file +!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y': +!!! error TS2320: Named properties 'm' of types 'X' and 'Y' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/bases.errors.txt b/tests/baselines/reference/bases.errors.txt index f4dc4ab5c8f..a4a04af142d 100644 --- a/tests/baselines/reference/bases.errors.txt +++ b/tests/baselines/reference/bases.errors.txt @@ -1,3 +1,16 @@ +tests/cases/compiler/bases.ts(7,15): error TS1005: ';' expected. +tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected. +tests/cases/compiler/bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'. +tests/cases/compiler/bases.ts(7,17): error TS2304: Cannot find name 'any'. +tests/cases/compiler/bases.ts(11,7): error TS2421: Class 'C' incorrectly implements interface 'I': + Property 'x' is missing in type 'C'. +tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call. +tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'. +tests/cases/compiler/bases.ts(13,17): error TS2304: Cannot find name 'any'. +tests/cases/compiler/bases.ts(17,9): error TS2339: Property 'x' does not exist on type 'C'. +tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist on type 'C'. + + ==== tests/cases/compiler/bases.ts (10 errors) ==== interface I { x; @@ -7,38 +20,38 @@ constructor() { this.y: any; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property 'y' does not exist on type 'B'. +!!! error TS2339: Property 'y' does not exist on type 'B'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. } } class C extends B implements I { ~ -!!! Class 'C' incorrectly implements interface 'I': -!!! Property 'x' is missing in type 'C'. +!!! error TS2421: Class 'C' incorrectly implements interface 'I': +!!! error TS2421: Property 'x' is missing in type 'C'. constructor() { ~~~~~~~~~~~~~~~ this.x: any; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~~~~~~~~~~~~ ~ -!!! Property 'x' does not exist on type 'C'. +!!! error TS2339: Property 'x' does not exist on type 'C'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } new C().x; ~ -!!! Property 'x' does not exist on type 'C'. +!!! error TS2339: Property 'x' does not exist on type 'C'. new C().y; ~ -!!! Property 'y' does not exist on type 'C'. +!!! error TS2339: Property 'y' does not exist on type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.errors.txt b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.errors.txt index 9d86da98f3f..532a40becd9 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.errors.txt +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(11,10): error TS2367: No best common type exists between 'number' and 'string'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(12,10): error TS2367: No best common type exists between 'Derived' and 'Derived2'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(15,12): error TS2367: No best common type exists between 'T' and 'U'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(18,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(19,12): error TS2367: No best common type exists between 'T' and 'U'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(22,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(22,28): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(23,12): error TS2367: No best common type exists between 'T' and 'U'. + + ==== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts (8 errors) ==== // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors @@ -11,31 +21,31 @@ var r2 = true ? 1 : ''; ~~~~~~~~~~~~~ -!!! No best common type exists between 'number' and 'string'. +!!! error TS2367: No best common type exists between 'number' and 'string'. var r9 = true ? derived : derived2; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between 'Derived' and 'Derived2'. +!!! error TS2367: No best common type exists between 'Derived' and 'Derived2'. function foo(t: T, u: U) { return true ? t : u; ~~~~~~~~~~~~ -!!! No best common type exists between 'T' and 'U'. +!!! error TS2367: No best common type exists between 'T' and 'U'. } function foo2(t: T, u: U) { // Error for referencing own type parameter ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return true ? t : u; // Ok because BCT(T, U) = U ~~~~~~~~~~~~ -!!! No best common type exists between 'T' and 'U'. +!!! error TS2367: No best common type exists between 'T' and 'U'. } function foo3(t: T, u: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return true ? t : u; ~~~~~~~~~~~~ -!!! No best common type exists between 'T' and 'U'. +!!! error TS2367: No best common type exists between 'T' and 'U'. } \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic3.errors.txt b/tests/baselines/reference/binaryArithmatic3.errors.txt index 74f3662aad7..6dffe5e150c 100644 --- a/tests/baselines/reference/binaryArithmatic3.errors.txt +++ b/tests/baselines/reference/binaryArithmatic3.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/binaryArithmatic3.ts(1,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/binaryArithmatic3.ts(1,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/binaryArithmatic3.ts (2 errors) ==== var v = undefined | undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic4.errors.txt b/tests/baselines/reference/binaryArithmatic4.errors.txt index 87200bec116..f72c23073ca 100644 --- a/tests/baselines/reference/binaryArithmatic4.errors.txt +++ b/tests/baselines/reference/binaryArithmatic4.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/binaryArithmatic4.ts(1,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/binaryArithmatic4.ts(1,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/binaryArithmatic4.ts (2 errors) ==== var v = null | null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/bind1.errors.txt b/tests/baselines/reference/bind1.errors.txt index 0f883d94f52..3d50d18b1bc 100644 --- a/tests/baselines/reference/bind1.errors.txt +++ b/tests/baselines/reference/bind1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/bind1.ts(2,31): error TS2304: Cannot find name 'I'. + + ==== tests/cases/compiler/bind1.ts (1 errors) ==== module M { export class C implements I {} // this should be an unresolved symbol I error ~ -!!! Cannot find name 'I'. +!!! error TS2304: Cannot find name 'I'. } \ No newline at end of file diff --git a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt index 8ec2f4e0407..d730ef41fd8 100644 --- a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts(5,10): error TS1005: ',' expected. +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts(5,11): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts(8,27): error TS1134: Variable declaration expected. +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts(11,9): error TS1109: Expression expected. + + ==== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts (4 errors) ==== // Unary operator ~ var q; @@ -5,16 +11,16 @@ // operand before ~ var a = q~; //expect error ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // multiple operands after ~ var mul = ~[1, 2, "abc"], ""; //expect error ~~ -!!! Variable declaration expected. +!!! error TS1134: Variable declaration expected. // miss an operand var b =~; ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt index 3513093d9f4..fe91cc8a339 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(46,26): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(47,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(48,26): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. + + ==== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts (3 errors) ==== // ~ operator on any type @@ -46,13 +51,13 @@ var ResultIsNumber15 = ~(ANY + ANY1); var ResultIsNumber16 = ~(null + undefined); ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber17 = ~(null + null); ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber18 = ~(undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. // multiple ~ operators var ResultIsNumber19 = ~~ANY; diff --git a/tests/baselines/reference/boolInsteadOfBoolean.errors.txt b/tests/baselines/reference/boolInsteadOfBoolean.errors.txt index 611d98995d8..13141b6235b 100644 --- a/tests/baselines/reference/boolInsteadOfBoolean.errors.txt +++ b/tests/baselines/reference/boolInsteadOfBoolean.errors.txt @@ -1,6 +1,9 @@ +tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts(1,8): error TS2304: Cannot find name 'bool'. + + ==== tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts (1 errors) ==== var x: bool; ~~~~ -!!! Cannot find name 'bool'. +!!! error TS2304: Cannot find name 'bool'. var a: boolean = x; x = a; \ No newline at end of file diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt b/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt index 667108c902d..c331ff09c2c 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/breakInIterationOrSwitchStatement4.ts(1,15): error TS2304: Cannot find name 'something'. + + ==== tests/cases/compiler/breakInIterationOrSwitchStatement4.ts (1 errors) ==== for (var i in something) { ~~~~~~~~~ -!!! Cannot find name 'something'. +!!! error TS2304: Cannot find name 'something'. break; } \ No newline at end of file diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt index 6220fd09e9d..28a762f3d09 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts(1,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. + + ==== tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts (1 errors) ==== break; ~~~~~~ -!!! A 'break' statement can only be used within an enclosing iteration or switch statement. \ No newline at end of file +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. \ No newline at end of file diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt index e34345f8e8c..d77fb4bc05b 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts(3,5): error TS1107: Jump target cannot cross function boundary. + + ==== tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts (1 errors) ==== while (true) { function f() { break; ~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } \ No newline at end of file diff --git a/tests/baselines/reference/breakTarget5.errors.txt b/tests/baselines/reference/breakTarget5.errors.txt index a9b3932bcbb..a54a415b990 100644 --- a/tests/baselines/reference/breakTarget5.errors.txt +++ b/tests/baselines/reference/breakTarget5.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/breakTarget5.ts(5,7): error TS1107: Jump target cannot cross function boundary. + + ==== tests/cases/compiler/breakTarget5.ts (1 errors) ==== target: while (true) { @@ -5,7 +8,7 @@ while (true) { break target; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } } \ No newline at end of file diff --git a/tests/baselines/reference/breakTarget6.errors.txt b/tests/baselines/reference/breakTarget6.errors.txt index 3a921bc6d36..82d823c986d 100644 --- a/tests/baselines/reference/breakTarget6.errors.txt +++ b/tests/baselines/reference/breakTarget6.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/breakTarget6.ts(2,3): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. + + ==== tests/cases/compiler/breakTarget6.ts (1 errors) ==== while (true) { break target; ~~~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. } \ No newline at end of file diff --git a/tests/baselines/reference/callConstructAssignment.errors.txt b/tests/baselines/reference/callConstructAssignment.errors.txt index e80dbcbfc38..e3f850a1855 100644 --- a/tests/baselines/reference/callConstructAssignment.errors.txt +++ b/tests/baselines/reference/callConstructAssignment.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/callConstructAssignment.ts(7,1): error TS2323: Type 'new () => any' is not assignable to type '() => void'. +tests/cases/compiler/callConstructAssignment.ts(8,1): error TS2323: Type '() => void' is not assignable to type 'new () => any'. + + ==== tests/cases/compiler/callConstructAssignment.ts (2 errors) ==== @@ -7,7 +11,7 @@ foo = bar; // error ~~~ -!!! Type 'new () => any' is not assignable to type '() => void'. +!!! error TS2323: Type 'new () => any' is not assignable to type '() => void'. bar = foo; // error ~~~ -!!! Type '() => void' is not assignable to type 'new () => any'. \ No newline at end of file +!!! error TS2323: Type '() => void' is not assignable to type 'new () => any'. \ No newline at end of file diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt index dfe311ab86c..0e8e8ff9303 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(5,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(6,11): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(9,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(10,11): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(13,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(14,11): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(21,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(22,11): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(28,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(29,11): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(36,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(37,11): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(43,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(44,11): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts (14 errors) ==== // type parameter lists must exactly match type argument lists // all of these invocations are errors @@ -5,26 +21,26 @@ function f(x: T, y: U): T { return null; } var r1 = f(1, ''); ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r1b = f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f2 = (x: T, y: U): T => { return null; } var r2 = f2(1, ''); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2b = f2(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f3: { (x: T, y: U): T; } var r3 = f3(1, ''); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r3b = f3(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class C { f(x: T, y: U): T { @@ -33,10 +49,10 @@ } var r4 = (new C()).f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r4b = (new C()).f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. interface I { f(x: T, y: U): T; @@ -44,10 +60,10 @@ var i: I; var r5 = i.f(1, ''); ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r5b = i.f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class C2 { f(x: T, y: U): T { @@ -56,10 +72,10 @@ } var r6 = (new C2()).f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r6b = (new C2()).f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. interface I2 { f(x: T, y: U): T; @@ -67,7 +83,7 @@ var i2: I2; var r7 = i2.f(1, ''); ~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r7b = i2.f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt index 69284efdf82..6a11751ead3 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt @@ -1,3 +1,14 @@ +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(5,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(8,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(11,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(18,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(24,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(31,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(37,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(40,10): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(43,10): error TS2347: Untyped function calls may not accept type arguments. + + ==== tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts (9 errors) ==== // it is always illegal to provide type arguments to a non-generic function // all invocations here are illegal @@ -5,17 +16,17 @@ function f(x: number) { return null; } var r = f(1); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f2 = (x: number) => { return null; } var r2 = f2(1); ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f3: { (x: number): any; } var r3 = f3(1); ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class C { f(x: number) { @@ -24,7 +35,7 @@ } var r4 = (new C()).f(1); ~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. interface I { f(x: number): any; @@ -32,7 +43,7 @@ var i: I; var r5 = i.f(1); ~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class C2 { f(x: number) { @@ -41,7 +52,7 @@ } var r6 = (new C2()).f(1); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. interface I2 { f(x: number); @@ -49,14 +60,14 @@ var i2: I2; var r7 = i2.f(1); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var a; var r8 = a(); ~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. var a2: any; var r8 = a2(); ~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. \ No newline at end of file +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/callOnClass.errors.txt b/tests/baselines/reference/callOnClass.errors.txt index 9232fefe703..83e4472dd4f 100644 --- a/tests/baselines/reference/callOnClass.errors.txt +++ b/tests/baselines/reference/callOnClass.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/callOnClass.ts(2,9): error TS2348: Value of type 'typeof C' is not callable. Did you mean to include 'new'? + + ==== tests/cases/compiler/callOnClass.ts (1 errors) ==== class C { } var c = C(); ~~~ -!!! Value of type 'typeof C' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof C' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/callOnInstance.errors.txt b/tests/baselines/reference/callOnInstance.errors.txt index da866a56e04..c1861d05377 100644 --- a/tests/baselines/reference/callOnInstance.errors.txt +++ b/tests/baselines/reference/callOnInstance.errors.txt @@ -1,19 +1,25 @@ +tests/cases/compiler/callOnInstance.ts(3,15): error TS2300: Duplicate identifier 'D'. +tests/cases/compiler/callOnInstance.ts(7,19): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/callOnInstance.ts(7,19): error TS2350: Only a void function can be called with the 'new' keyword. +tests/cases/compiler/callOnInstance.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. + + ==== tests/cases/compiler/callOnInstance.ts (4 errors) ==== declare function D(): string; declare class D { constructor (value: number); } // Duplicate identifier ~ -!!! Duplicate identifier 'D'. +!!! error TS2300: Duplicate identifier 'D'. var s1: string = D(); // OK var s2: string = (new D(1))(); ~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. declare class C { constructor(value: number); } (new C(1))(); // Error for calling an instance ~~~~~~~~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. \ No newline at end of file +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. \ No newline at end of file diff --git a/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt b/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt index 46b7f099ff0..9c85dad20e9 100644 --- a/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt +++ b/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/callOverloadViaElementAccessExpression.ts(10,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/callOverloadViaElementAccessExpression.ts(11,5): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/callOverloadViaElementAccessExpression.ts (2 errors) ==== class C { foo(x: number): number; @@ -10,7 +14,7 @@ var c = new C(); var r: string = c['foo'](1); ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var r2: number = c['foo'](''); ~~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/callOverloads1.errors.txt b/tests/baselines/reference/callOverloads1.errors.txt index a561ffb0c83..759c00aa7e4 100644 --- a/tests/baselines/reference/callOverloads1.errors.txt +++ b/tests/baselines/reference/callOverloads1.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/callOverloads1.ts(9,10): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads1.ts(9,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/callOverloads1.ts(17,1): error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? + + ==== tests/cases/compiler/callOverloads1.ts (3 errors) ==== class Foo { bar1() { /*WScript.Echo("bar1");*/ } @@ -9,9 +14,9 @@ function Foo(); // error ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. function F1(s:string); function F1(a:any) { return a;} @@ -21,4 +26,4 @@ f1.bar1(); Foo(); ~~~~~ -!!! Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? \ No newline at end of file +!!! error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/callOverloads2.errors.txt b/tests/baselines/reference/callOverloads2.errors.txt index a715c13401e..693b67872eb 100644 --- a/tests/baselines/reference/callOverloads2.errors.txt +++ b/tests/baselines/reference/callOverloads2.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/callOverloads2.ts(11,10): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads2.ts(13,10): error TS2389: Function implementation name must be 'Foo'. +tests/cases/compiler/callOverloads2.ts(14,1): error TS2393: Duplicate function implementation. +tests/cases/compiler/callOverloads2.ts(16,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/callOverloads2.ts(24,1): error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? + + ==== tests/cases/compiler/callOverloads2.ts (5 errors) ==== @@ -11,18 +18,18 @@ function Foo(); ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. function F1(s:string) {return s;} ~~ -!!! Function implementation name must be 'Foo'. +!!! error TS2389: Function implementation name must be 'Foo'. function F1(a:any) { return a;} // error - duplicate identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. function Goo(s:string); // error - no implementation ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. declare function Gar(s:String); // expect no error @@ -32,5 +39,5 @@ f1.bar1(); Foo(); ~~~~~ -!!! Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/callOverloads3.errors.txt b/tests/baselines/reference/callOverloads3.errors.txt index e6b7fecb59f..986f0478369 100644 --- a/tests/baselines/reference/callOverloads3.errors.txt +++ b/tests/baselines/reference/callOverloads3.errors.txt @@ -1,16 +1,23 @@ +tests/cases/compiler/callOverloads3.ts(2,16): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads3.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/callOverloads3.ts(3,24): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads3.ts(4,7): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads3.ts(12,10): error TS2350: Only a void function can be called with the 'new' keyword. + + ==== tests/cases/compiler/callOverloads3.ts (5 errors) ==== function Foo():Foo; ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. class Foo { ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { // WScript.Echo("Constructor function has executed"); @@ -20,7 +27,7 @@ var f1 = new Foo("hey"); ~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. f1.bar1(); diff --git a/tests/baselines/reference/callOverloads4.errors.txt b/tests/baselines/reference/callOverloads4.errors.txt index 5fafef84f4c..cec3a1834ba 100644 --- a/tests/baselines/reference/callOverloads4.errors.txt +++ b/tests/baselines/reference/callOverloads4.errors.txt @@ -1,16 +1,23 @@ +tests/cases/compiler/callOverloads4.ts(2,16): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads4.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/callOverloads4.ts(3,24): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads4.ts(4,7): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads4.ts(12,10): error TS2350: Only a void function can be called with the 'new' keyword. + + ==== tests/cases/compiler/callOverloads4.ts (5 errors) ==== function Foo():Foo; ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. class Foo { ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } constructor(s: string); constructor(x: any) { @@ -20,7 +27,7 @@ var f1 = new Foo("hey"); ~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. f1.bar1(); diff --git a/tests/baselines/reference/callOverloads5.errors.txt b/tests/baselines/reference/callOverloads5.errors.txt index 7df261b7e0c..240e10b9f55 100644 --- a/tests/baselines/reference/callOverloads5.errors.txt +++ b/tests/baselines/reference/callOverloads5.errors.txt @@ -1,15 +1,22 @@ +tests/cases/compiler/callOverloads5.ts(1,16): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads5.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/callOverloads5.ts(2,24): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads5.ts(3,7): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads5.ts(13,10): error TS2350: Only a void function can be called with the 'new' keyword. + + ==== tests/cases/compiler/callOverloads5.ts (5 errors) ==== function Foo():Foo; ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. class Foo { ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. bar1(s:string); bar1(n:number); bar1(a:any) { /*WScript.Echo(a);*/ } @@ -21,7 +28,7 @@ var f1 = new Foo("hey"); ~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. f1.bar1("a"); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt index 17087865020..d0e31f4a246 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2': + Types of property 'a' are incompatible: + Type '(x: number) => string' is not assignable to type '(x: number) => number': + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts (1 errors) ==== module CallSignature { interface Base { // T @@ -57,10 +63,10 @@ // S's interface I2 extends Base2 { ~~ -!!! Interface 'I2' incorrectly extends interface 'Base2': -!!! Types of property 'a' are incompatible: -!!! Type '(x: number) => string' is not assignable to type '(x: number) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type '(x: number) => string' is not assignable to type '(x: number) => number': +!!! error TS2429: Type 'string' is not assignable to type 'number'. // N's a: (x: number) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt index 81cd8b924f0..51bf9695692 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2429: Interface 'I2' incorrectly extends interface 'A': + Types of property 'a2' are incompatible: + Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]': + Types of parameters 'x' and 'x' are incompatible: + Type 'T' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2429: Interface 'I4' incorrectly extends interface 'A': + Types of property 'a8' are incompatible: + Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': + Types of parameters 'y' and 'y' are incompatible: + Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': + Types of parameters 'arg2' and 'arg2' are incompatible: + Type '{ foo: number; }' is not assignable to type 'Base': + Types of property 'foo' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts (2 errors) ==== // checking subtype relations for function types as it relates to contextual signature instantiation // error cases @@ -51,11 +67,11 @@ interface I2 extends A { ~~ -!!! Interface 'I2' incorrectly extends interface 'A': -!!! Types of property 'a2' are incompatible: -!!! Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'T' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'A': +!!! error TS2429: Types of property 'a2' are incompatible: +!!! error TS2429: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]': +!!! error TS2429: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type 'number'. a2: (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic } @@ -66,15 +82,15 @@ interface I4 extends A { ~~ -!!! Interface 'I4' incorrectly extends interface 'A': -!!! Types of property 'a8' are incompatible: -!!! Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type '{ foo: number; }' is not assignable to type 'Base': -!!! Types of property 'foo' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'I4' incorrectly extends interface 'A': +!!! error TS2429: Types of property 'a8' are incompatible: +!!! error TS2429: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': +!!! error TS2429: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': +!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base': +!!! error TS2429: Types of property 'foo' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. a8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt index 7cd13f2fafb..1f018be434a 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt @@ -1,15 +1,33 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(3,14): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(4,22): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(5,22): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(15,9): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(23,6): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(24,20): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(34,6): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(35,9): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(44,9): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(45,32): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(46,9): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(23,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(24,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(34,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(35,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(45,32): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts (16 errors) ==== // Optional parameters cannot also have initializer expressions, these are all errors function foo(x?: number = 1) { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. var f = function foo(x?: number = 1) { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. var f2 = (x: number, y? = 1) => { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. foo(1); foo(); @@ -21,7 +39,7 @@ class C { foo(x?: number = 1) { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. } var c: C; @@ -31,14 +49,14 @@ interface I { (x? = 1); ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x: number, y?: number = 1); ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~~~~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } var i: I; @@ -50,14 +68,14 @@ var a: { (x?: number = 1); ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~~~~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x? = 1); ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } a(); @@ -68,15 +86,15 @@ var b = { foo(x?: number = 1) { }, ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. a: function foo(x: number, y?: number = '') { }, ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. b: (x?: any = '') => { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. } b.foo(); diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt index 349e8513e70..1c558910a8c 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts(9,10): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts (1 errors) ==== interface I1 { (value: T): void; @@ -9,5 +12,5 @@ test("expects boolean instead of string"); // should not error - "test" should not expect a boolean test(true); // should error - string expected ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt index b0df8303150..aada6c9f8a1 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I': + Named properties 'foo' of types 'I' and 'I' are not identical. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(13,16): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + + ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts (2 errors) ==== // Normally it is an error to have multiple overloads which differ only by return type in a single type declaration. // Here the multiple overloads come from multiple bases. @@ -8,13 +13,13 @@ interface A extends I, I { } ~ -!!! Interface 'A' cannot simultaneously extend types 'I' and 'I': -!!! Named properties 'foo' of types 'I' and 'I' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I': +!!! error TS2320: Named properties 'foo' of types 'I' and 'I' are not identical. var x: A; // BUG 822524 var r = x.foo(1); // no error var r2 = x.foo(''); // error ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt index f7d58ea096e..c5a30ad21ad 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt @@ -1,119 +1,161 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(3,24): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(4,22): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(4,32): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(5,20): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(5,30): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(6,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(7,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(9,15): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(9,34): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(10,23): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(10,42): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(11,20): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(11,39): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(12,11): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(12,30): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(13,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(13,28): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(16,9): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(16,19): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(17,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(17,28): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(18,13): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(18,26): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(22,6): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(22,17): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(23,6): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(23,25): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(24,9): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(24,20): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(25,9): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(26,19): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(30,9): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(30,19): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(31,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(31,29): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(35,9): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(36,32): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(37,12): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(37,25): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts (40 errors) ==== // Call signature parameters do not allow accessibility modifiers function foo(public x, private y) { } ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f = function foo(public x, private y) { } ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f2 = function (public x, private y) { } ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f3 = (x, private y) => { } ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f4 = (public x: T, y: T) => { } ~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. function foo2(private x: string, public y: number) { } ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f5 = function foo(private x: string, public y: number) { } ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f6 = function (private x: string, public y: number) { } ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f7 = (private x: string, public y: number) => { } ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f8 = (private x: T, public y: T) => { } ~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. class C { foo(public x, private y) { } ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo2(public x: number, private y: string) { } ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo3(public x: T, private y: T) { } ~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } interface I { (private x, public y); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. (private x: string, public y: number); ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo(private x, public y); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo(public x: number, y: string); ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo3(x: T, private y: T); ~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var a: { foo(public x, private y); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo2(private x: number, public y: string); ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. }; var b = { foo(public x, y) { }, ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. a: function foo(x: number, private y: string) { }, ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. b: (public x: T, private y: T) => { } ~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt index facb92dd461..ff1fd1e66cf 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt @@ -1,83 +1,107 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(3,17): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(4,25): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(5,23): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(6,14): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(7,20): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(9,26): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(10,34): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(11,31): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(12,22): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(16,12): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(17,21): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(18,19): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(22,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(23,17): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(24,12): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(25,20): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(26,19): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(30,12): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(31,21): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(35,12): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(36,32): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(37,18): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts (22 errors) ==== // Duplicate parameter names are always an error function foo(x, x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f = function foo(x, x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f2 = function (x, x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f3 = (x, x) => { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f4 = (x: T, x: T) => { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. function foo2(x: string, x: number) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f5 = function foo(x: string, x: number) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f6 = function (x: string, x: number) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f7 = (x: string, x: number) => { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f8 = (x: T, y: T) => { } class C { foo(x, x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo2(x: number, x: string) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo3(x: T, x: T) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } interface I { (x, x); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. (x: string, x: number); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo(x, x); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo(x: number, x: string); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo3(x: T, x: T); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } var a: { foo(x, x); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo2(x: number, x: string); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. }; var b = { foo(x, x) { }, ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. a: function foo(x: number, x: string) { }, ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. b: (x: T, x: T) => { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt index 033fa6d51c0..ffff3886375 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts(24,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts(25,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts(36,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts(37,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts (4 errors) ==== // Optional parameters allow initializers only in implementation signatures @@ -24,10 +30,10 @@ interface I { (x = 1); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x: number, y = 1); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } var i: I; @@ -40,10 +46,10 @@ var a: { (x = 1); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x = 1); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } a(); diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt index ad4a81aa7f1..fcc1eee9169 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt @@ -1,10 +1,16 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(20,15): error TS1005: '{' expected. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(4,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(11,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(21,5): error TS2300: Duplicate identifier 'foo'. + + ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts (4 errors) ==== // Optional parameters allow initializers only in implementation signatures // All the below declarations are errors function foo(x = 2); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function foo(x = 1) { } foo(1); @@ -13,7 +19,7 @@ class C { foo(x = 2); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x = 1) { } } @@ -24,10 +30,10 @@ var b = { foo(x = 1), ~ -!!! '{' expected. +!!! error TS1005: '{' expected. foo(x = 1) { }, ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. } b.foo(); diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt index 027efabf4a4..a3776946292 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts(3,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts(5,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts (2 errors) ==== function f() { } f(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. f(); f(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt b/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt index aaa831dc2ac..2df02c30185 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/callbackArgsDifferByOptionality.ts(1,23): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/callbackArgsDifferByOptionality.ts(4,5): error TS2304: Cannot find name 'cb'. + + ==== tests/cases/compiler/callbackArgsDifferByOptionality.ts (2 errors) ==== function x3(callback: (x?: 'hi') => number); ~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x3(callback: (x: string) => number); function x3(callback: (x: any) => number) { cb(); ~~ -!!! Cannot find name 'cb'. +!!! error TS2304: Cannot find name 'cb'. } \ No newline at end of file diff --git a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt index 504e08eadf0..cfb9287cdbc 100644 --- a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt +++ b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,21): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,15): error TS2339: Property 'ClassA' does not exist on type 'typeof M'. + + ==== tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts (2 errors) ==== module M { @@ -5,6 +9,6 @@ } var t = new M.ClassA[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! Property 'ClassA' does not exist on type 'typeof M'. \ No newline at end of file +!!! error TS2339: Property 'ClassA' does not exist on type 'typeof M'. \ No newline at end of file diff --git a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt index 015bd2d43c3..7be5a1f086c 100644 --- a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt +++ b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts(1,23): error TS2304: Cannot find name 'any'. + + ==== tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts (1 errors) ==== var test: any[] = new any[1]; ~~~ -!!! Cannot find name 'any'. \ No newline at end of file +!!! error TS2304: Cannot find name 'any'. \ No newline at end of file diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt b/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt index 3052a7fb28a..d3eea6619b6 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/catchClauseWithTypeAnnotation.ts(2,11): error TS1013: Catch clause parameter cannot have a type annotation. + + ==== tests/cases/compiler/catchClauseWithTypeAnnotation.ts (1 errors) ==== try { } catch (e: any) { ~ -!!! Catch clause parameter cannot have a type annotation. +!!! error TS1013: Catch clause parameter cannot have a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignment1.errors.txt b/tests/baselines/reference/chainedAssignment1.errors.txt index 9bab75fe15c..29555d10dcb 100644 --- a/tests/baselines/reference/chainedAssignment1.errors.txt +++ b/tests/baselines/reference/chainedAssignment1.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X': + Property 'a' is missing in type 'Z'. +tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y': + Property 'a' is missing in type 'Z'. +tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2323: Type 'Z' is not assignable to type 'Y'. + + ==== tests/cases/compiler/chainedAssignment1.ts (3 errors) ==== class X { constructor(public z) { } @@ -21,11 +28,11 @@ var c3 = new Z(); c1 = c2 = c3; // a bug made this not report the same error as below ~~ -!!! Type 'Z' is not assignable to type 'X': -!!! Property 'a' is missing in type 'Z'. +!!! error TS2322: Type 'Z' is not assignable to type 'X': +!!! error TS2322: Property 'a' is missing in type 'Z'. ~~ -!!! Type 'Z' is not assignable to type 'Y': -!!! Property 'a' is missing in type 'Z'. +!!! error TS2322: Type 'Z' is not assignable to type 'Y': +!!! error TS2322: Property 'a' is missing in type 'Z'. c2 = c3; // Error TS111: Cannot convert Z to Y ~~ -!!! Type 'Z' is not assignable to type 'Y'. \ No newline at end of file +!!! error TS2323: Type 'Z' is not assignable to type 'Y'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignment3.errors.txt b/tests/baselines/reference/chainedAssignment3.errors.txt index 61d34172032..758c3e2a332 100644 --- a/tests/baselines/reference/chainedAssignment3.errors.txt +++ b/tests/baselines/reference/chainedAssignment3.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2322: Type 'A' is not assignable to type 'B': + Property 'value' is missing in type 'A'. +tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2323: Type 'A' is not assignable to type 'B'. + + ==== tests/cases/compiler/chainedAssignment3.ts (2 errors) ==== class A { id: number; @@ -18,11 +23,11 @@ // error cases b = a = new A(); ~ -!!! Type 'A' is not assignable to type 'B': -!!! Property 'value' is missing in type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'B': +!!! error TS2322: Property 'value' is missing in type 'A'. a = b = new A(); ~ -!!! Type 'A' is not assignable to type 'B'. +!!! error TS2323: Type 'A' is not assignable to type 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignmentChecking.errors.txt b/tests/baselines/reference/chainedAssignmentChecking.errors.txt index f5580d38c03..3748995e4f0 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.errors.txt +++ b/tests/baselines/reference/chainedAssignmentChecking.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X': + Property 'a' is missing in type 'Z'. +tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y': + Property 'a' is missing in type 'Z'. + + ==== tests/cases/compiler/chainedAssignmentChecking.ts (2 errors) ==== class X { constructor(public z) { } @@ -21,9 +27,9 @@ c1 = c2 = c3; // Should be error ~~ -!!! Type 'Z' is not assignable to type 'X': -!!! Property 'a' is missing in type 'Z'. +!!! error TS2322: Type 'Z' is not assignable to type 'X': +!!! error TS2322: Property 'a' is missing in type 'Z'. ~~ -!!! Type 'Z' is not assignable to type 'Y': -!!! Property 'a' is missing in type 'Z'. +!!! error TS2322: Type 'Z' is not assignable to type 'Y': +!!! error TS2322: Property 'a' is missing in type 'Z'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt index 0448b6d44a0..be465275de5 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,59): error TS2345: Argument of type '(c: C) => B' is not assignable to parameter of type '(x: C) => C'. + + ==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (1 errors) ==== class Chain { constructor(public value: T) { } @@ -19,4 +22,4 @@ // Ok to go down the chain, but error to try to climb back up (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); ~~~~~~~~~~ -!!! Argument of type '(c: C) => B' is not assignable to parameter of type '(x: C) => C'. \ No newline at end of file +!!! error TS2345: Argument of type '(c: C) => B' is not assignable to parameter of type '(x: C) => C'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt index 3cb1395700d..26df8a15ca0 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(7,43): error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(10,29): error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts (5 errors) ==== class Chain { constructor(public value: T) { } @@ -7,12 +14,12 @@ // Ok to go down the chain, but error to climb up the chain (new Chain(t)).then(tt => s).then(ss => t); ~~~~~~~ -!!! Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. +!!! error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. // But error to try to climb up the chain (new Chain(s)).then(ss => t); ~~~~~~~ -!!! Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. +!!! error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. // Staying at T or S should be fine (new Chain(t)).then(tt => t).then(tt => t).then(tt => t); @@ -36,16 +43,16 @@ // Should get an error that we are assigning a string to a number (new Chain2(i)).then(ii => t).then(tt => s).value.x = ""; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. // Staying at T or S should keep the constraint. // Get an error when we assign a string to a number in both cases (new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value.x = ""; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value.x = ""; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. return null; } diff --git a/tests/baselines/reference/checkForObjectTooStrict.errors.txt b/tests/baselines/reference/checkForObjectTooStrict.errors.txt index cc2cfc4cf7d..7af7481f6ae 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.errors.txt +++ b/tests/baselines/reference/checkForObjectTooStrict.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/checkForObjectTooStrict.ts(22,19): error TS2311: A class may only extend another class. +tests/cases/compiler/checkForObjectTooStrict.ts(26,9): error TS2335: 'super' can only be referenced in a derived class. + + ==== tests/cases/compiler/checkForObjectTooStrict.ts (2 errors) ==== module Foo { @@ -22,13 +26,13 @@ class Baz extends Object { ~~~~~~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. constructor () { // ERROR, as expected super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } diff --git a/tests/baselines/reference/circularModuleImports.errors.txt b/tests/baselines/reference/circularModuleImports.errors.txt index 8ce4566a683..9423ddd05ff 100644 --- a/tests/baselines/reference/circularModuleImports.errors.txt +++ b/tests/baselines/reference/circularModuleImports.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/circularModuleImports.ts(5,5): error TS2303: Circular definition of import alias 'A'. + + ==== tests/cases/compiler/circularModuleImports.ts (1 errors) ==== module M @@ -5,7 +8,7 @@ import A = B; ~~~~~~~~~~~~~ -!!! Circular definition of import alias 'A'. +!!! error TS2303: Circular definition of import alias 'A'. import B = A; diff --git a/tests/baselines/reference/circularReference.errors.txt b/tests/baselines/reference/circularReference.errors.txt index 2a825b9fc87..667d1ca895d 100644 --- a/tests/baselines/reference/circularReference.errors.txt +++ b/tests/baselines/reference/circularReference.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(9,12): error TS2339: Property 'x' does not exist on type 'C1'. +tests/cases/conformance/externalModules/foo2.ts(8,12): error TS2339: Property 'y' does not exist on type 'C1'. +tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x' does not exist on type 'C1'. + + ==== tests/cases/conformance/externalModules/foo2.ts (2 errors) ==== import foo1 = require('./foo1'); export module M1 { @@ -8,14 +14,14 @@ this.m1 = new foo1.M1.C1(); this.m1.y = 10; // Error ~ -!!! Property 'y' does not exist on type 'C1'. +!!! error TS2339: Property 'y' does not exist on type 'C1'. this.m1.x = 20; // OK var tmp = new M1.C1(); tmp.y = 10; // OK tmp.x = 20; // Error ~ -!!! Property 'x' does not exist on type 'C1'. +!!! error TS2339: Property 'x' does not exist on type 'C1'. } } } @@ -23,7 +29,7 @@ ==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ==== import foo2 = require('./foo2'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export module M1 { export class C1 { m1: foo2.M1.C1; @@ -33,7 +39,7 @@ this.m1.y = 10; // OK this.m1.x = 20; // Error ~ -!!! Property 'x' does not exist on type 'C1'. +!!! error TS2339: Property 'x' does not exist on type 'C1'. } } } diff --git a/tests/baselines/reference/class1.errors.txt b/tests/baselines/reference/class1.errors.txt index 9acb45f4c2a..91d29d981c2 100644 --- a/tests/baselines/reference/class1.errors.txt +++ b/tests/baselines/reference/class1.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/class1.ts(2,7): error TS2300: Duplicate identifier 'foo'. + + ==== tests/cases/compiler/class1.ts (1 errors) ==== interface foo{ } class foo{ } ~~~ -!!! Duplicate identifier 'foo'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/class2.errors.txt b/tests/baselines/reference/class2.errors.txt index 5e362d9941a..dde3612b68f 100644 --- a/tests/baselines/reference/class2.errors.txt +++ b/tests/baselines/reference/class2.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/class2.ts(1,29): error TS1129: Statement expected. +tests/cases/compiler/class2.ts(1,45): error TS1128: Declaration or statement expected. + + ==== tests/cases/compiler/class2.ts (2 errors) ==== class foo { constructor() { static f = 3; } } ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/classAndInterface1.errors.txt b/tests/baselines/reference/classAndInterface1.errors.txt index 6d6bb495c3d..d497fb4c44e 100644 --- a/tests/baselines/reference/classAndInterface1.errors.txt +++ b/tests/baselines/reference/classAndInterface1.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/classAndInterface1.ts(2,11): error TS2300: Duplicate identifier 'cli'. + + ==== tests/cases/compiler/classAndInterface1.ts (1 errors) ==== class cli { } interface cli { } // error ~~~ -!!! Duplicate identifier 'cli'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'cli'. \ No newline at end of file diff --git a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt index 95c1893ff1d..a92f31ef469 100644 --- a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt +++ b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt @@ -1,8 +1,12 @@ +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(2,11): error TS2300: Duplicate identifier 'C'. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(9,15): error TS2300: Duplicate identifier 'D'. + + ==== tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts (2 errors) ==== class C { foo: string; } interface C { foo: string; } // error ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. module M { class D { @@ -11,7 +15,7 @@ interface D { // error ~ -!!! Duplicate identifier 'D'. +!!! error TS2300: Duplicate identifier 'D'. bar: string; } } \ No newline at end of file diff --git a/tests/baselines/reference/classAndVariableWithSameName.errors.txt b/tests/baselines/reference/classAndVariableWithSameName.errors.txt index fa9d852a976..fb8b7e2dcde 100644 --- a/tests/baselines/reference/classAndVariableWithSameName.errors.txt +++ b/tests/baselines/reference/classAndVariableWithSameName.errors.txt @@ -1,8 +1,12 @@ +tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts(2,5): error TS2300: Duplicate identifier 'C'. +tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts(9,9): error TS2300: Duplicate identifier 'D'. + + ==== tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts (2 errors) ==== class C { foo: string; } var C = ''; // error ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. module M { class D { @@ -11,5 +15,5 @@ var D = 1; // error ~ -!!! Duplicate identifier 'D'. +!!! error TS2300: Duplicate identifier 'D'. } \ No newline at end of file diff --git a/tests/baselines/reference/classBodyWithStatements.errors.txt b/tests/baselines/reference/classBodyWithStatements.errors.txt index 840402821fa..6da42dbb6bf 100644 --- a/tests/baselines/reference/classBodyWithStatements.errors.txt +++ b/tests/baselines/reference/classBodyWithStatements.errors.txt @@ -1,19 +1,25 @@ +tests/cases/conformance/classes/classDeclarations/classBody/classBodyWithStatements.ts(2,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/classes/classDeclarations/classBody/classBodyWithStatements.ts(3,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/classes/classDeclarations/classBody/classBodyWithStatements.ts(6,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/classes/classDeclarations/classBody/classBodyWithStatements.ts(7,1): error TS1128: Declaration or statement expected. + + ==== tests/cases/conformance/classes/classDeclarations/classBody/classBodyWithStatements.ts (4 errors) ==== class C { var x = 1; ~~~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. class C2 { function foo() {} ~~~~~~~~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var x = 1; var y = 2; diff --git a/tests/baselines/reference/classCannotExtendVar.errors.txt b/tests/baselines/reference/classCannotExtendVar.errors.txt index 94d116248fa..deed94615ce 100644 --- a/tests/baselines/reference/classCannotExtendVar.errors.txt +++ b/tests/baselines/reference/classCannotExtendVar.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/classCannotExtendVar.ts(3,7): error TS2300: Duplicate identifier 'Markup'. + + ==== tests/cases/compiler/classCannotExtendVar.ts (1 errors) ==== var Markup; class Markup { ~~~~~~ -!!! Duplicate identifier 'Markup'. +!!! error TS2300: Duplicate identifier 'Markup'. constructor() { } } diff --git a/tests/baselines/reference/classConstructorAccessibility.errors.txt b/tests/baselines/reference/classConstructorAccessibility.errors.txt index fe2f1e22458..783d8a3ea1c 100644 --- a/tests/baselines/reference/classConstructorAccessibility.errors.txt +++ b/tests/baselines/reference/classConstructorAccessibility.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility.ts(6,5): error TS1089: 'private' modifier cannot appear on a constructor declaration. +tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility.ts(18,9): error TS1089: 'private' modifier cannot appear on a constructor declaration. + + ==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility.ts (2 errors) ==== class C { public constructor(public x: number) { } @@ -6,7 +10,7 @@ class D { private constructor(public x: number) { } // error ~~~~~~~ -!!! 'private' modifier cannot appear on a constructor declaration. +!!! error TS1089: 'private' modifier cannot appear on a constructor declaration. } var c = new C(1); @@ -20,7 +24,7 @@ class D { private constructor(public x: T) { } // error ~~~~~~~ -!!! 'private' modifier cannot appear on a constructor declaration. +!!! error TS1089: 'private' modifier cannot appear on a constructor declaration. } var c = new C(1); diff --git a/tests/baselines/reference/classExpression.errors.txt b/tests/baselines/reference/classExpression.errors.txt index 220bd9581e8..5a2bc4fd179 100644 --- a/tests/baselines/reference/classExpression.errors.txt +++ b/tests/baselines/reference/classExpression.errors.txt @@ -1,27 +1,36 @@ +tests/cases/conformance/classes/classExpression.ts(1,9): error TS1109: Expression expected. +tests/cases/conformance/classes/classExpression.ts(5,10): error TS1109: Expression expected. +tests/cases/conformance/classes/classExpression.ts(5,16): error TS1005: ':' expected. +tests/cases/conformance/classes/classExpression.ts(5,19): error TS1005: ',' expected. +tests/cases/conformance/classes/classExpression.ts(7,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/classes/classExpression.ts(10,13): error TS1109: Expression expected. +tests/cases/conformance/classes/classExpression.ts(5,16): error TS2304: Cannot find name 'C2'. + + ==== tests/cases/conformance/classes/classExpression.ts (7 errors) ==== var x = class C { ~~~~~ -!!! Expression expected. +!!! error TS1109: Expression expected. } var y = { foo: class C2 { ~~~~~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! Cannot find name 'C2'. +!!! error TS2304: Cannot find name 'C2'. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. module M { var z = class C4 { ~~~~~ -!!! Expression expected. +!!! error TS1109: Expression expected. } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendingPrimitive.errors.txt b/tests/baselines/reference/classExtendingPrimitive.errors.txt index 5b3ddb4fe7a..cab86e9e38e 100644 --- a/tests/baselines/reference/classExtendingPrimitive.errors.txt +++ b/tests/baselines/reference/classExtendingPrimitive.errors.txt @@ -1,37 +1,50 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(7,19): error TS1003: Identifier expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(9,19): error TS1003: Identifier expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(9,24): error TS1005: ';' expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(3,17): error TS2304: Cannot find name 'number'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(4,18): error TS2304: Cannot find name 'string'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(5,18): error TS2304: Cannot find name 'boolean'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(6,18): error TS2304: Cannot find name 'Void'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(8,18): error TS2304: Cannot find name 'Null'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(10,18): error TS2304: Cannot find name 'undefined'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(11,18): error TS2304: Cannot find name 'Undefined'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(14,18): error TS2311: A class may only extend another class. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts (11 errors) ==== // classes cannot extend primitives class C extends number { } ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. class C2 extends string { } ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. class C3 extends boolean { } ~~~~~~~ -!!! Cannot find name 'boolean'. +!!! error TS2304: Cannot find name 'boolean'. class C4 extends Void { } ~~~~ -!!! Cannot find name 'Void'. +!!! error TS2304: Cannot find name 'Void'. class C4a extends void {} ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. class C5 extends Null { } ~~~~ -!!! Cannot find name 'Null'. +!!! error TS2304: Cannot find name 'Null'. class C5a extends null { } ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. class C6 extends undefined { } ~~~~~~~~~ -!!! Cannot find name 'undefined'. +!!! error TS2304: Cannot find name 'undefined'. class C7 extends Undefined { } ~~~~~~~~~ -!!! Cannot find name 'Undefined'. +!!! error TS2304: Cannot find name 'Undefined'. enum E { A } class C8 extends E { } ~ -!!! A class may only extend another class. \ No newline at end of file +!!! error TS2311: A class may only extend another class. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendingPrimitive2.errors.txt b/tests/baselines/reference/classExtendingPrimitive2.errors.txt index 9d1f62d5350..9378c7bdc19 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.errors.txt +++ b/tests/baselines/reference/classExtendingPrimitive2.errors.txt @@ -1,11 +1,16 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(3,19): error TS1003: Identifier expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(4,19): error TS1003: Identifier expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(4,24): error TS1005: ';' expected. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts (3 errors) ==== // classes cannot extend primitives class C4a extends void {} ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. class C5a extends null { } ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendingQualifiedName.errors.txt b/tests/baselines/reference/classExtendingQualifiedName.errors.txt index 626c9d551c8..42eae691050 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.errors.txt +++ b/tests/baselines/reference/classExtendingQualifiedName.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/classExtendingQualifiedName.ts(5,21): error TS2305: Module 'M' has no exported member 'C'. + + ==== tests/cases/compiler/classExtendingQualifiedName.ts (1 errors) ==== module M { class C { @@ -5,6 +8,6 @@ class D extends M.C { ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt index 01a09095a99..50c90389520 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts(10,21): error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'. + + ==== tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts (1 errors) ==== class A { a: number; @@ -10,7 +13,7 @@ var A = 1; class B extends A { ~ -!!! Type name 'A' in extends clause does not reference constructor function for 'A'. +!!! error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'. b: string; } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.errors.txt b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.errors.txt index a3329ee1391..7f8b6fb411b 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.errors.txt +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts(4,21): error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'. + + ==== tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts (1 errors) ==== class A { a: number; } module Foo { var A = 1; class B extends A { b: string; } ~ -!!! Type name 'A' in extends clause does not reference constructor function for 'A'. +!!! error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'. } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsEveryObjectType.errors.txt b/tests/baselines/reference/classExtendsEveryObjectType.errors.txt index 1c6dacfd6d7..35fc2d30a35 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.errors.txt +++ b/tests/baselines/reference/classExtendsEveryObjectType.errors.txt @@ -1,31 +1,40 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,18): error TS1003: Identifier expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,18): error TS1003: Identifier expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,20): error TS1005: ';' expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(4,17): error TS2311: A class may only extend another class. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(8,18): error TS2304: Cannot find name 'x'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(11,18): error TS2304: Cannot find name 'M'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(14,18): error TS2304: Cannot find name 'foo'. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts (7 errors) ==== interface I { foo: string; } class C extends I { } // error ~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. class C2 extends { foo: string; } { } // error ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. var x: { foo: string; } class C3 extends x { } // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. module M { export var x = 1; } class C4 extends M { } // error ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. function foo() { } class C5 extends foo { } // error ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. class C6 extends []{ } // error ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt b/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt index 7a5573ae000..a60745020e7 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt +++ b/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt @@ -1,10 +1,15 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,18): error TS1003: Identifier expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,18): error TS1003: Identifier expected. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,20): error TS1005: ';' expected. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (3 errors) ==== class C2 extends { foo: string; } { } // error ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. class C6 extends []{ } // error ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsInterface.errors.txt b/tests/baselines/reference/classExtendsInterface.errors.txt index 4274e5e7089..746f3c4bea0 100644 --- a/tests/baselines/reference/classExtendsInterface.errors.txt +++ b/tests/baselines/reference/classExtendsInterface.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/classExtendsInterface.ts(2,17): error TS2311: A class may only extend another class. +tests/cases/compiler/classExtendsInterface.ts(6,21): error TS2311: A class may only extend another class. + + ==== tests/cases/compiler/classExtendsInterface.ts (2 errors) ==== interface Comparable {} class A extends Comparable {} ~~~~~~~~~~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. class B implements Comparable {} interface Comparable2 {} class A2 extends Comparable2 {} ~~~~~~~~~~~~~~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. class B2 implements Comparable2 {} \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt index a74abc33755..07bd35d1b76 100644 --- a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt +++ b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7): error TS2421: Class 'D2' incorrectly implements interface 'I': + Private property 'x' cannot be reimplemented. + + ==== tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts (1 errors) ==== class C { public foo(x: any) { return x; } @@ -10,8 +14,8 @@ class D2 implements I { ~~ -!!! Class 'D2' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'D2' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. public foo(x: any) { return x } private x = 3; other(x: any) { return x } diff --git a/tests/baselines/reference/classExtendsItself.errors.txt b/tests/baselines/reference/classExtendsItself.errors.txt index 6168ca3802a..bd15ae22c12 100644 --- a/tests/baselines/reference/classExtendsItself.errors.txt +++ b/tests/baselines/reference/classExtendsItself.errors.txt @@ -1,12 +1,17 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(1,7): error TS2310: Type 'C' recursively references itself as a base type. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(3,7): error TS2310: Type 'D' recursively references itself as a base type. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(5,7): error TS2310: Type 'E' recursively references itself as a base type. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts (3 errors) ==== class C extends C { } // error ~ -!!! Type 'C' recursively references itself as a base type. +!!! error TS2310: Type 'C' recursively references itself as a base type. class D extends D { } // error ~ -!!! Type 'D' recursively references itself as a base type. +!!! error TS2310: Type 'D' recursively references itself as a base type. class E extends E { } // error ~ -!!! Type 'E' recursively references itself as a base type. \ No newline at end of file +!!! error TS2310: Type 'E' recursively references itself as a base type. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.errors.txt b/tests/baselines/reference/classExtendsItselfIndirectly.errors.txt index 16184543cc3..b39ef5b905f 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.errors.txt +++ b/tests/baselines/reference/classExtendsItselfIndirectly.errors.txt @@ -1,7 +1,11 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(1,7): error TS2310: Type 'C' recursively references itself as a base type. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(7,7): error TS2310: Type 'C2' recursively references itself as a base type. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts (2 errors) ==== class C extends E { foo: string; } // error ~ -!!! Type 'C' recursively references itself as a base type. +!!! error TS2310: Type 'C' recursively references itself as a base type. class D extends C { bar: string; } @@ -9,7 +13,7 @@ class C2 extends E2 { foo: T; } // error ~~ -!!! Type 'C2' recursively references itself as a base type. +!!! error TS2310: Type 'C2' recursively references itself as a base type. class D2 extends C2 { bar: T; } diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt b/tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt index 0a5dcdd6316..a61291b5aa9 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt @@ -1,7 +1,11 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(1,7): error TS2310: Type 'C' recursively references itself as a base type. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(13,11): error TS2310: Type 'C2' recursively references itself as a base type. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts (2 errors) ==== class C extends N.E { foo: string; } // error ~ -!!! Type 'C' recursively references itself as a base type. +!!! error TS2310: Type 'C' recursively references itself as a base type. module M { export class D extends C { bar: string; } @@ -15,7 +19,7 @@ module O { class C2 extends Q.E2 { foo: T; } // error ~~ -!!! Type 'C2' recursively references itself as a base type. +!!! error TS2310: Type 'C2' recursively references itself as a base type. module P { export class D2 extends C2 { bar: T; } diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.errors.txt b/tests/baselines/reference/classExtendsItselfIndirectly3.errors.txt index 3eeccb7e618..8430ec887b5 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.errors.txt +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.errors.txt @@ -1,7 +1,11 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file1.ts(1,7): error TS2310: Type 'C' recursively references itself as a base type. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file4.ts(1,7): error TS2310: Type 'C2' recursively references itself as a base type. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file1.ts (1 errors) ==== class C extends E { foo: string; } // error ~ -!!! Type 'C' recursively references itself as a base type. +!!! error TS2310: Type 'C' recursively references itself as a base type. ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file2.ts (0 errors) ==== class D extends C { bar: string; } @@ -12,7 +16,7 @@ ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file4.ts (1 errors) ==== class C2 extends E2 { foo: T; } // error ~~ -!!! Type 'C2' recursively references itself as a base type. +!!! error TS2310: Type 'C2' recursively references itself as a base type. ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file5.ts (0 errors) ==== class D2 extends C2 { bar: T; } diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.errors.txt b/tests/baselines/reference/classExtendsMultipleBaseClasses.errors.txt index 545c2b21961..86b271c9ae8 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.errors.txt +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/classExtendsMultipleBaseClasses.ts(3,18): error TS1005: '{' expected. +tests/cases/compiler/classExtendsMultipleBaseClasses.ts(3,21): error TS1005: ';' expected. + + ==== tests/cases/compiler/classExtendsMultipleBaseClasses.ts (2 errors) ==== class A { } class B { } class C extends A,B { } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.errors.txt b/tests/baselines/reference/classExtendsShadowedConstructorFunction.errors.txt index 516154005ce..782dd2a2dbc 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.errors.txt +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts(5,21): error TS2419: Type name 'C' in extends clause does not reference constructor function for 'C'. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts (1 errors) ==== class C { foo: string; } @@ -5,7 +8,7 @@ var C = 1; class D extends C { // error, C must evaluate to constructor function ~ -!!! Type name 'C' in extends clause does not reference constructor function for 'C'. +!!! error TS2419: Type name 'C' in extends clause does not reference constructor function for 'C'. bar: string; } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.errors.txt b/tests/baselines/reference/classExtendsValidConstructorFunction.errors.txt index eb7571a2436..ad2262819ed 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.errors.txt +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsValidConstructorFunction.ts(5,17): error TS2304: Cannot find name 'foo'. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsValidConstructorFunction.ts (1 errors) ==== function foo() { } @@ -5,4 +8,4 @@ class C extends foo { } // error, cannot extend it though ~~~ -!!! Cannot find name 'foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.errors.txt b/tests/baselines/reference/classHeritageWithTrailingSeparator.errors.txt index 216f434d161..1a323fd5aa4 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.errors.txt +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/classHeritageWithTrailingSeparator.ts(2,18): error TS1005: '{' expected. + + ==== tests/cases/compiler/classHeritageWithTrailingSeparator.ts (1 errors) ==== class C { foo: number } class D extends C, { ~ -!!! '{' expected. +!!! error TS1005: '{' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass2.errors.txt b/tests/baselines/reference/classImplementsClass2.errors.txt index a48b000b895..f1fabd8a975 100644 --- a/tests/baselines/reference/classImplementsClass2.errors.txt +++ b/tests/baselines/reference/classImplementsClass2.errors.txt @@ -1,9 +1,15 @@ +tests/cases/compiler/classImplementsClass2.ts(2,7): error TS2421: Class 'C' incorrectly implements interface 'A': + Property 'foo' is missing in type 'C'. +tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is not assignable to type 'C2': + Property 'foo' is missing in type 'C'. + + ==== tests/cases/compiler/classImplementsClass2.ts (2 errors) ==== class A { foo(): number { return 1; } } class C implements A {} // error ~ -!!! Class 'C' incorrectly implements interface 'A': -!!! Property 'foo' is missing in type 'C'. +!!! error TS2421: Class 'C' incorrectly implements interface 'A': +!!! error TS2421: Property 'foo' is missing in type 'C'. class C2 extends A { foo() { @@ -16,5 +22,5 @@ c = c2; c2 = c; ~~ -!!! Type 'C' is not assignable to type 'C2': -!!! Property 'foo' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2': +!!! error TS2322: Property 'foo' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass4.errors.txt b/tests/baselines/reference/classImplementsClass4.errors.txt index eb9848c63a9..7539cb1a752 100644 --- a/tests/baselines/reference/classImplementsClass4.errors.txt +++ b/tests/baselines/reference/classImplementsClass4.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/classImplementsClass4.ts(5,7): error TS2421: Class 'C' incorrectly implements interface 'A': + Property 'x' is missing in type 'C'. +tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is not assignable to type 'C2': + Property 'x' is missing in type 'C'. + + ==== tests/cases/compiler/classImplementsClass4.ts (2 errors) ==== class A { private x = 1; @@ -5,8 +11,8 @@ } class C implements A { ~ -!!! Class 'C' incorrectly implements interface 'A': -!!! Property 'x' is missing in type 'C'. +!!! error TS2421: Class 'C' incorrectly implements interface 'A': +!!! error TS2421: Property 'x' is missing in type 'C'. foo() { return 1; } @@ -19,5 +25,5 @@ c = c2; c2 = c; ~~ -!!! Type 'C' is not assignable to type 'C2': -!!! Property 'x' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2': +!!! error TS2322: Property 'x' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass5.errors.txt b/tests/baselines/reference/classImplementsClass5.errors.txt index 97f83fc83f8..ba0616f5723 100644 --- a/tests/baselines/reference/classImplementsClass5.errors.txt +++ b/tests/baselines/reference/classImplementsClass5.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/classImplementsClass5.ts(5,7): error TS2421: Class 'C' incorrectly implements interface 'A': + Private property 'x' cannot be reimplemented. +tests/cases/compiler/classImplementsClass5.ts(16,1): error TS2322: Type 'C2' is not assignable to type 'C': + Private property 'x' cannot be reimplemented. +tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is not assignable to type 'C2': + Private property 'x' cannot be reimplemented. + + ==== tests/cases/compiler/classImplementsClass5.ts (3 errors) ==== class A { private x = 1; @@ -5,8 +13,8 @@ } class C implements A { ~ -!!! Class 'C' incorrectly implements interface 'A': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'C' incorrectly implements interface 'A': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x = 1; foo() { return 1; @@ -19,9 +27,9 @@ var c2: C2; c = c2; ~ -!!! Type 'C2' is not assignable to type 'C': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2322: Type 'C2' is not assignable to type 'C': +!!! error TS2322: Private property 'x' cannot be reimplemented. c2 = c; ~~ -!!! Type 'C' is not assignable to type 'C2': -!!! Private property 'x' cannot be reimplemented. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2': +!!! error TS2322: Private property 'x' cannot be reimplemented. \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass6.errors.txt b/tests/baselines/reference/classImplementsClass6.errors.txt index 789c579fe94..706f94c8fbb 100644 --- a/tests/baselines/reference/classImplementsClass6.errors.txt +++ b/tests/baselines/reference/classImplementsClass6.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/classImplementsClass6.ts(20,3): error TS2339: Property 'bar' does not exist on type 'C'. +tests/cases/compiler/classImplementsClass6.ts(21,4): error TS2339: Property 'bar' does not exist on type 'C2'. + + ==== tests/cases/compiler/classImplementsClass6.ts (2 errors) ==== class A { static bar(): string { @@ -20,7 +24,7 @@ c2 = c; c.bar(); // error ~~~ -!!! Property 'bar' does not exist on type 'C'. +!!! error TS2339: Property 'bar' does not exist on type 'C'. c2.bar(); // should error ~~~ -!!! Property 'bar' does not exist on type 'C2'. \ No newline at end of file +!!! error TS2339: Property 'bar' does not exist on type 'C2'. \ No newline at end of file diff --git a/tests/baselines/reference/classIndexer2.errors.txt b/tests/baselines/reference/classIndexer2.errors.txt index 4278564d8ff..82629584ee5 100644 --- a/tests/baselines/reference/classIndexer2.errors.txt +++ b/tests/baselines/reference/classIndexer2.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/classIndexer2.ts(4,5): error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. + + ==== tests/cases/compiler/classIndexer2.ts (1 errors) ==== class C123 { [s: string]: number; x: number; y: string; ~~~~~~~~~~ -!!! Property 'y' of type 'string' is not assignable to string index type 'number'. +!!! error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. constructor() { } } \ No newline at end of file diff --git a/tests/baselines/reference/classIndexer3.errors.txt b/tests/baselines/reference/classIndexer3.errors.txt index f923a3364a1..eb7a2467fba 100644 --- a/tests/baselines/reference/classIndexer3.errors.txt +++ b/tests/baselines/reference/classIndexer3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/classIndexer3.ts(9,5): error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. + + ==== tests/cases/compiler/classIndexer3.ts (1 errors) ==== class C123 { [s: string]: number; @@ -9,5 +12,5 @@ x: number; y: string; ~~~~~~~~~~ -!!! Property 'y' of type 'string' is not assignable to string index type 'number'. +!!! error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. } \ No newline at end of file diff --git a/tests/baselines/reference/classIndexer4.errors.txt b/tests/baselines/reference/classIndexer4.errors.txt index 06559adf909..f5a132b3dc2 100644 --- a/tests/baselines/reference/classIndexer4.errors.txt +++ b/tests/baselines/reference/classIndexer4.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/classIndexer4.ts(9,5): error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. + + ==== tests/cases/compiler/classIndexer4.ts (1 errors) ==== class C123 { [s: string]: number; @@ -9,5 +12,5 @@ x: number; y: string; ~~~~~~~~~~ -!!! Property 'y' of type 'string' is not assignable to string index type 'number'. +!!! error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. } \ No newline at end of file diff --git a/tests/baselines/reference/classInheritence.errors.txt b/tests/baselines/reference/classInheritence.errors.txt index 0b655daf932..483812c6b5f 100644 --- a/tests/baselines/reference/classInheritence.errors.txt +++ b/tests/baselines/reference/classInheritence.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/classInheritence.ts(2,7): error TS2310: Type 'A' recursively references itself as a base type. + + ==== tests/cases/compiler/classInheritence.ts (1 errors) ==== class B extends A { } class A extends A { } ~ -!!! Type 'A' recursively references itself as a base type. \ No newline at end of file +!!! error TS2310: Type 'A' recursively references itself as a base type. \ No newline at end of file diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt b/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt index fa5dcab0973..e2c85ab46b0 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts(11,7): error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>': + Types of property 'foo' are incompatible: + Type '{ bar?: string; }' is not assignable to type '{ bar: string; }': + Required property 'bar' cannot be reimplemented with optional property in '{ bar?: string; }'. + + ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts (1 errors) ==== class Base { foo: T; @@ -11,10 +17,10 @@ class Derived2 extends Base<{ bar: string; }> { ~~~~~~~~ -!!! Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>': -!!! Types of property 'foo' are incompatible: -!!! Type '{ bar?: string; }' is not assignable to type '{ bar: string; }': -!!! Required property 'bar' cannot be reimplemented with optional property in '{ bar?: string; }'. +!!! error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>': +!!! error TS2416: Types of property 'foo' are incompatible: +!!! error TS2416: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }': +!!! error TS2416: Required property 'bar' cannot be reimplemented with optional property in '{ bar?: string; }'. foo: { bar?: string; // error } diff --git a/tests/baselines/reference/classMemberInitializerScoping.errors.txt b/tests/baselines/reference/classMemberInitializerScoping.errors.txt index c34cdca7c90..7df3c0518b6 100644 --- a/tests/baselines/reference/classMemberInitializerScoping.errors.txt +++ b/tests/baselines/reference/classMemberInitializerScoping.errors.txt @@ -1,14 +1,18 @@ +tests/cases/compiler/classMemberInitializerScoping.ts(3,17): error TS2301: Initializer of instance member variable 'y' cannot reference identifier 'aaa' declared in the constructor. +tests/cases/compiler/classMemberInitializerScoping.ts(6,9): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/classMemberInitializerScoping.ts (2 errors) ==== var aaa = 1; class CCC { y: number = aaa; ~~~ -!!! Initializer of instance member variable 'y' cannot reference identifier 'aaa' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'y' cannot reference identifier 'aaa' declared in the constructor. static staticY: number = aaa; // This shouldnt be error constructor(aaa) { this.y = ''; // was: error, cannot assign string to number ~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. } } diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping.errors.txt index 6f05862d765..2fac6733cca 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/classMemberInitializerWithLamdaScoping.ts(23,21): error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. + + ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping.ts (1 errors) ==== declare var console: { log(msg?: any): void; @@ -23,7 +26,7 @@ messageHandler = () => { console.log(field1); // But this should be error as the field1 will resolve to var field1 ~~~~~~ -!!! Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. // but since this code would be generated inside constructor, in generated js // it would resolve to private field1 and thats not what user intended here. }; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.errors.txt index d5864dac852..7a41e8bdeed 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/classMemberInitializerWithLamdaScoping2_1.ts(8,21): error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. + + ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping2_0.ts (0 errors) ==== var field1: string; @@ -11,7 +14,7 @@ messageHandler = () => { console.log(field1); // But this should be error as the field1 will resolve to var field1 ~~~~~~ -!!! Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. // but since this code would be generated inside constructor, in generated js // it would resolve to private field1 and thats not what user intended here. }; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt index e77499fca31..f396b722263 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. + + ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (0 errors) ==== var field1: string; @@ -7,13 +11,13 @@ }; export class Test1 { ~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. constructor(private field1: string) { } messageHandler = () => { console.log(field1); // But this should be error as the field1 will resolve to var field1 ~~~~~~ -!!! Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. // but since this code would be generated inside constructor, in generated js // it would resolve to private field1 and thats not what user intended here. }; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt index 4926a2c6410..84e7994fd0c 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2304: Cannot find name 'field1'. + + ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (1 errors) ==== export var field1: string; ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts (1 errors) ==== declare var console: { @@ -13,6 +17,6 @@ messageHandler = () => { console.log(field1); // Should be error that couldnt find symbol field1 ~~~~~~ -!!! Cannot find name 'field1'. +!!! error TS2304: Cannot find name 'field1'. }; } \ No newline at end of file diff --git a/tests/baselines/reference/classOverloadForFunction.errors.txt b/tests/baselines/reference/classOverloadForFunction.errors.txt index eb3fe5bc33b..41f960dba66 100644 --- a/tests/baselines/reference/classOverloadForFunction.errors.txt +++ b/tests/baselines/reference/classOverloadForFunction.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/classOverloadForFunction.ts(2,10): error TS2300: Duplicate identifier 'foo'. + + ==== tests/cases/compiler/classOverloadForFunction.ts (1 errors) ==== class foo { }; function foo() {} ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/classOverloadForFunction2.errors.txt b/tests/baselines/reference/classOverloadForFunction2.errors.txt index 3d73a8bb3f3..df635f10129 100644 --- a/tests/baselines/reference/classOverloadForFunction2.errors.txt +++ b/tests/baselines/reference/classOverloadForFunction2.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/classOverloadForFunction2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/classOverloadForFunction2.ts(2,7): error TS2300: Duplicate identifier 'bar'. + + ==== tests/cases/compiler/classOverloadForFunction2.ts (2 errors) ==== function bar(): string; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. class bar {} ~~~ -!!! Duplicate identifier 'bar'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'bar'. \ No newline at end of file diff --git a/tests/baselines/reference/classPropertyAsPrivate.errors.txt b/tests/baselines/reference/classPropertyAsPrivate.errors.txt index c5d922c0ad5..1ba10c61bd6 100644 --- a/tests/baselines/reference/classPropertyAsPrivate.errors.txt +++ b/tests/baselines/reference/classPropertyAsPrivate.errors.txt @@ -1,21 +1,35 @@ +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(3,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(4,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(8,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(9,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(15,1): error TS2341: Property 'C.x' is inaccessible. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(16,1): error TS2341: Property 'C.y' is inaccessible. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(17,1): error TS2341: Property 'C.y' is inaccessible. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(18,1): error TS2341: Property 'C.foo' is inaccessible. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(20,1): error TS2341: Property 'C.a' is inaccessible. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(21,1): error TS2341: Property 'C.b' is inaccessible. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(22,1): error TS2341: Property 'C.b' is inaccessible. +tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(23,1): error TS2341: Property 'C.foo' is inaccessible. + + ==== tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts (12 errors) ==== class C { private x: string; private get y() { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private set y(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private foo() { } private static a: string; private static get b() { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static set b(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static foo() { } } @@ -23,26 +37,26 @@ // all errors c.x; ~~~ -!!! Property 'C.x' is inaccessible. +!!! error TS2341: Property 'C.x' is inaccessible. c.y; ~~~ -!!! Property 'C.y' is inaccessible. +!!! error TS2341: Property 'C.y' is inaccessible. c.y = 1; ~~~ -!!! Property 'C.y' is inaccessible. +!!! error TS2341: Property 'C.y' is inaccessible. c.foo(); ~~~~~ -!!! Property 'C.foo' is inaccessible. +!!! error TS2341: Property 'C.foo' is inaccessible. C.a; ~~~ -!!! Property 'C.a' is inaccessible. +!!! error TS2341: Property 'C.a' is inaccessible. C.b(); ~~~ -!!! Property 'C.b' is inaccessible. +!!! error TS2341: Property 'C.b' is inaccessible. C.b = 1; ~~~ -!!! Property 'C.b' is inaccessible. +!!! error TS2341: Property 'C.b' is inaccessible. C.foo(); ~~~~~ -!!! Property 'C.foo' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'C.foo' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt b/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt index c8c7f86dde0..1d200f6e2e7 100644 --- a/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt @@ -1,21 +1,27 @@ +tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts (4 errors) ==== class C { x: string; get y() { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set y(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { } static a: string; static get b() { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set b(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static foo() { } } diff --git a/tests/baselines/reference/classSideInheritance1.errors.txt b/tests/baselines/reference/classSideInheritance1.errors.txt index fa1035551ed..b1f02bac123 100644 --- a/tests/baselines/reference/classSideInheritance1.errors.txt +++ b/tests/baselines/reference/classSideInheritance1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/classSideInheritance1.ts(12,3): error TS2339: Property 'bar' does not exist on type 'A'. +tests/cases/compiler/classSideInheritance1.ts(13,3): error TS2339: Property 'bar' does not exist on type 'C2'. + + ==== tests/cases/compiler/classSideInheritance1.ts (2 errors) ==== class A { static bar(): string { @@ -12,9 +16,9 @@ var c: C2; a.bar(); // static off an instance - should be an error ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. c.bar(); // static off an instance - should be an error ~~~ -!!! Property 'bar' does not exist on type 'C2'. +!!! error TS2339: Property 'bar' does not exist on type 'C2'. A.bar(); // valid C2.bar(); // valid \ No newline at end of file diff --git a/tests/baselines/reference/classSideInheritance3.errors.txt b/tests/baselines/reference/classSideInheritance3.errors.txt index c7ce9606b02..48d7165adcd 100644 --- a/tests/baselines/reference/classSideInheritance3.errors.txt +++ b/tests/baselines/reference/classSideInheritance3.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/classSideInheritance3.ts(16,5): error TS2323: Type 'typeof B' is not assignable to type 'typeof A'. +tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2323: Type 'typeof B' is not assignable to type 'new (x: string) => A'. + + ==== tests/cases/compiler/classSideInheritance3.ts (2 errors) ==== class A { constructor(public x: string) { @@ -16,8 +20,8 @@ var r1: typeof A = B; // error ~~ -!!! Type 'typeof B' is not assignable to type 'typeof A'. +!!! error TS2323: Type 'typeof B' is not assignable to type 'typeof A'. var r2: new (x: string) => A = B; // error ~~ -!!! Type 'typeof B' is not assignable to type 'new (x: string) => A'. +!!! error TS2323: Type 'typeof B' is not assignable to type 'new (x: string) => A'. var r3: typeof A = C; // ok \ No newline at end of file diff --git a/tests/baselines/reference/classTypeParametersInStatics.errors.txt b/tests/baselines/reference/classTypeParametersInStatics.errors.txt index 8fc40c979f7..cc1336a8804 100644 --- a/tests/baselines/reference/classTypeParametersInStatics.errors.txt +++ b/tests/baselines/reference/classTypeParametersInStatics.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/classTypeParametersInStatics.ts(12,40): error TS2302: Static members cannot reference class type parameters. +tests/cases/compiler/classTypeParametersInStatics.ts(13,29): error TS2302: Static members cannot reference class type parameters. +tests/cases/compiler/classTypeParametersInStatics.ts(13,43): error TS2302: Static members cannot reference class type parameters. + + ==== tests/cases/compiler/classTypeParametersInStatics.ts (3 errors) ==== module Editor { @@ -12,12 +17,12 @@ public static MakeHead(): List { // should error ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. var entry: List = new List(true, null); ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. entry.prev = entry; entry.next = entry; return entry; diff --git a/tests/baselines/reference/classUpdateTests.errors.txt b/tests/baselines/reference/classUpdateTests.errors.txt index f7f4036254b..660f2791148 100644 --- a/tests/baselines/reference/classUpdateTests.errors.txt +++ b/tests/baselines/reference/classUpdateTests.errors.txt @@ -1,3 +1,23 @@ +tests/cases/compiler/classUpdateTests.ts(93,3): error TS1129: Statement expected. +tests/cases/compiler/classUpdateTests.ts(95,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/classUpdateTests.ts(99,3): error TS1129: Statement expected. +tests/cases/compiler/classUpdateTests.ts(101,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/classUpdateTests.ts(105,3): error TS1129: Statement expected. +tests/cases/compiler/classUpdateTests.ts(111,3): error TS1129: Statement expected. +tests/cases/compiler/classUpdateTests.ts(34,2): error TS2377: Constructors for derived classes must contain a 'super' call. +tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/compiler/classUpdateTests.ts(46,17): error TS2311: A class may only extend another class. +tests/cases/compiler/classUpdateTests.ts(47,18): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/compiler/classUpdateTests.ts(57,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/compiler/classUpdateTests.ts(63,7): error TS2416: Class 'L' incorrectly extends base class 'G': + Private property 'p1' cannot be reimplemented. +tests/cases/compiler/classUpdateTests.ts(69,7): error TS2416: Class 'M' incorrectly extends base class 'G': + Private property 'p1' cannot be reimplemented. +tests/cases/compiler/classUpdateTests.ts(70,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/compiler/classUpdateTests.ts(105,15): error TS2339: Property 'p1' does not exist on type 'Q'. +tests/cases/compiler/classUpdateTests.ts(111,16): error TS2339: Property 'p1' does not exist on type 'R'. + + ==== tests/cases/compiler/classUpdateTests.ts (16 errors) ==== // // test codegen for instance properties @@ -34,7 +54,7 @@ class F extends E { constructor() {} // ERROR - super call required ~~~~~~~~~~~~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } class G extends D { @@ -45,15 +65,15 @@ class H { constructor() { super(); } // ERROR - no super call allowed ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } class I extends Object { ~~~~~~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. constructor() { super(); } // ERROR - no super call allowed ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } class J extends G { @@ -71,13 +91,13 @@ ~~~~~~~~~~ } ~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class L extends G { ~ -!!! Class 'L' incorrectly extends base class 'G': -!!! Private property 'p1' cannot be reimplemented. +!!! error TS2416: Class 'L' incorrectly extends base class 'G': +!!! error TS2416: Private property 'p1' cannot be reimplemented. constructor(private p1:number) { super(); // NO ERROR } @@ -85,8 +105,8 @@ class M extends G { ~ -!!! Class 'M' incorrectly extends base class 'G': -!!! Private property 'p1' cannot be reimplemented. +!!! error TS2416: Class 'M' incorrectly extends base class 'G': +!!! error TS2416: Private property 'p1' cannot be reimplemented. constructor(private p1:number) { // ERROR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var i = 0; @@ -95,7 +115,7 @@ ~~~~~~~~~~ } ~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } // @@ -117,29 +137,29 @@ constructor() { public p1 = 0; // ERROR ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. class P { constructor() { private p1 = 0; // ERROR ~~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. class Q { constructor() { public this.p1 = 0; // ERROR ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~ -!!! Property 'p1' does not exist on type 'Q'. +!!! error TS2339: Property 'p1' does not exist on type 'Q'. } } @@ -147,8 +167,8 @@ constructor() { private this.p1 = 0; // ERROR ~~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~ -!!! Property 'p1' does not exist on type 'R'. +!!! error TS2339: Property 'p1' does not exist on type 'R'. } } \ No newline at end of file diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.errors.txt b/tests/baselines/reference/classWithBaseClassButNoConstructor.errors.txt index 28938907d7a..75f24d8c45a 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.errors.txt +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithBaseClassButNoConstructor.ts(10,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithBaseClassButNoConstructor.ts(22,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithBaseClassButNoConstructor.ts(31,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithBaseClassButNoConstructor.ts(39,10): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/classes/members/constructorFunctionTypes/classWithBaseClassButNoConstructor.ts (4 errors) ==== class Base { constructor(x: number) { } @@ -10,7 +16,7 @@ var r = C; var c = new C(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c2 = new C(1); // ok class Base2 { @@ -24,7 +30,7 @@ var r2 = D; var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(1); // ok // specialized base class @@ -35,7 +41,7 @@ var r3 = D2; var d3 = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d4 = new D(1); // ok class D3 extends Base2 { @@ -45,5 +51,5 @@ var r4 = D3; var d5 = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d6 = new D(1); // ok \ No newline at end of file diff --git a/tests/baselines/reference/classWithConstructors.errors.txt b/tests/baselines/reference/classWithConstructors.errors.txt index f6612ca87f7..61e0b1248b1 100644 --- a/tests/baselines/reference/classWithConstructors.errors.txt +++ b/tests/baselines/reference/classWithConstructors.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts(6,13): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts(15,14): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts(21,13): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts(31,13): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts(40,14): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts(46,13): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts (6 errors) ==== module NonGeneric { class C { @@ -6,7 +14,7 @@ var c = new C(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c2 = new C(''); // ok class C2 { @@ -17,7 +25,7 @@ var c3 = new C2(); // error ~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c4 = new C2(''); // ok var c5 = new C2(1); // ok @@ -25,7 +33,7 @@ var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(1); // ok var d3 = new D(''); // ok } @@ -37,7 +45,7 @@ var c = new C(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c2 = new C(''); // ok class C2 { @@ -48,7 +56,7 @@ var c3 = new C2(); // error ~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c4 = new C2(''); // ok var c5 = new C2(1, 2); // ok @@ -56,7 +64,7 @@ var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(1); // ok var d3 = new D(''); // ok } \ No newline at end of file diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt b/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt index 56f34575468..5463a3b21ee 100644 --- a/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt +++ b/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2421: Class 'D' incorrectly implements interface 'I': + Property 'foo' is missing in type 'D'. + + ==== tests/cases/compiler/classWithMultipleBaseClasses.ts (1 errors) ==== class A { foo() { } @@ -18,8 +22,8 @@ class D implements I, J { ~ -!!! Class 'D' incorrectly implements interface 'I': -!!! Property 'foo' is missing in type 'D'. +!!! error TS2421: Class 'D' incorrectly implements interface 'I': +!!! error TS2421: Property 'foo' is missing in type 'D'. baz() { } bat() { } } diff --git a/tests/baselines/reference/classWithOptionalParameter.errors.txt b/tests/baselines/reference/classWithOptionalParameter.errors.txt index 028e1f62dff..6e512c2a02e 100644 --- a/tests/baselines/reference/classWithOptionalParameter.errors.txt +++ b/tests/baselines/reference/classWithOptionalParameter.errors.txt @@ -1,20 +1,26 @@ +tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts(4,6): error TS1112: A class member cannot be declared optional. +tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts(5,6): error TS1112: A class member cannot be declared optional. +tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts(9,6): error TS1112: A class member cannot be declared optional. +tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts(10,6): error TS1112: A class member cannot be declared optional. + + ==== tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts (4 errors) ==== // classes do not permit optional parameters, these are errors class C { x?: string; ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. f?() {} ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. } class C2 { x?: T; ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. f?(x: T) {} ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. } \ No newline at end of file diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.errors.txt b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.errors.txt index 1d2d5bb0c70..23d6c6a6847 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.errors.txt +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/classWithOverloadImplementationOfWrongName.ts(4,5): error TS2389: Function implementation name must be 'foo'. + + ==== tests/cases/compiler/classWithOverloadImplementationOfWrongName.ts (1 errors) ==== class C { foo(): string; foo(x): number; bar(x): any { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.errors.txt b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.errors.txt index 9d4c0588e63..6ed05607d19 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.errors.txt +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/classWithOverloadImplementationOfWrongName2.ts(3,5): error TS2389: Function implementation name must be 'foo'. +tests/cases/compiler/classWithOverloadImplementationOfWrongName2.ts(4,5): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/classWithOverloadImplementationOfWrongName2.ts (2 errors) ==== class C { foo(): string; bar(x): any { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. foo(x): number; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt b/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt index 47ff1f52e66..a0dfb5d62c1 100644 --- a/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt +++ b/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt @@ -1,15 +1,21 @@ +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(3,7): error TS2414: Class name cannot be 'any' +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(4,7): error TS2414: Class name cannot be 'number' +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(5,7): error TS2414: Class name cannot be 'boolean' +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(6,7): error TS2414: Class name cannot be 'string' + + ==== tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts (4 errors) ==== // classes cannot use predefined types as names class any { } ~~~ -!!! Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any' class number { } ~~~~~~ -!!! Class name cannot be 'number' +!!! error TS2414: Class name cannot be 'number' class boolean { } ~~~~~~~ -!!! Class name cannot be 'boolean' +!!! error TS2414: Class name cannot be 'boolean' class string { } ~~~~~~ -!!! Class name cannot be 'string' \ No newline at end of file +!!! error TS2414: Class name cannot be 'string' \ No newline at end of file diff --git a/tests/baselines/reference/classWithPredefinedTypesAsNames2.errors.txt b/tests/baselines/reference/classWithPredefinedTypesAsNames2.errors.txt index 0d6065e7a71..73cb373180c 100644 --- a/tests/baselines/reference/classWithPredefinedTypesAsNames2.errors.txt +++ b/tests/baselines/reference/classWithPredefinedTypesAsNames2.errors.txt @@ -1,6 +1,9 @@ +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames2.ts(3,7): error TS1003: Identifier expected. + + ==== tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames2.ts (1 errors) ==== // classes cannot use predefined types as names class void {} ~~~~ -!!! Identifier expected. \ No newline at end of file +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/classWithPrivateProperty.errors.txt b/tests/baselines/reference/classWithPrivateProperty.errors.txt index aa1664bbb37..54d960a412a 100644 --- a/tests/baselines/reference/classWithPrivateProperty.errors.txt +++ b/tests/baselines/reference/classWithPrivateProperty.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/types/members/classWithPrivateProperty.ts(15,18): error TS2341: Property 'C.x' is inaccessible. +tests/cases/conformance/types/members/classWithPrivateProperty.ts(16,18): error TS2341: Property 'C.a' is inaccessible. +tests/cases/conformance/types/members/classWithPrivateProperty.ts(17,18): error TS2341: Property 'C.b' is inaccessible. +tests/cases/conformance/types/members/classWithPrivateProperty.ts(18,18): error TS2341: Property 'C.c' is inaccessible. +tests/cases/conformance/types/members/classWithPrivateProperty.ts(19,18): error TS2341: Property 'C.d' is inaccessible. +tests/cases/conformance/types/members/classWithPrivateProperty.ts(20,18): error TS2341: Property 'C.e' is inaccessible. +tests/cases/conformance/types/members/classWithPrivateProperty.ts(21,18): error TS2341: Property 'C.f' is inaccessible. +tests/cases/conformance/types/members/classWithPrivateProperty.ts(22,18): error TS2341: Property 'C.g' is inaccessible. + + ==== tests/cases/conformance/types/members/classWithPrivateProperty.ts (8 errors) ==== // accessing any private outside the class is an error @@ -15,25 +25,25 @@ var c = new C(); var r1: string = c.x; ~~~ -!!! Property 'C.x' is inaccessible. +!!! error TS2341: Property 'C.x' is inaccessible. var r2: string = c.a; ~~~ -!!! Property 'C.a' is inaccessible. +!!! error TS2341: Property 'C.a' is inaccessible. var r3: string = c.b; ~~~ -!!! Property 'C.b' is inaccessible. +!!! error TS2341: Property 'C.b' is inaccessible. var r4: string = c.c(); ~~~ -!!! Property 'C.c' is inaccessible. +!!! error TS2341: Property 'C.c' is inaccessible. var r5: string = c.d(); ~~~ -!!! Property 'C.d' is inaccessible. +!!! error TS2341: Property 'C.d' is inaccessible. var r6: string = C.e; ~~~ -!!! Property 'C.e' is inaccessible. +!!! error TS2341: Property 'C.e' is inaccessible. var r7: string = C.f(); ~~~ -!!! Property 'C.f' is inaccessible. +!!! error TS2341: Property 'C.f' is inaccessible. var r8: string = C.g(); ~~~ -!!! Property 'C.g' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'C.g' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/classWithStaticMembers.errors.txt b/tests/baselines/reference/classWithStaticMembers.errors.txt index 63f6d4b76e0..814cb9343e8 100644 --- a/tests/baselines/reference/classWithStaticMembers.errors.txt +++ b/tests/baselines/reference/classWithStaticMembers.errors.txt @@ -1,12 +1,16 @@ +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts(4,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts (2 errors) ==== class C { static fn() { return this; } static get x() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set x(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. constructor(public a: number, private b: number) { } static foo: string; } diff --git a/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt b/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt index 6ed2fe3f84d..6df51d85be3 100644 --- a/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt +++ b/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt @@ -1,14 +1,18 @@ +tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(3,5): error TS2392: Multiple constructor implementations are not allowed. +tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(8,5): error TS2392: Multiple constructor implementations are not allowed. + + ==== tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts (2 errors) ==== class C { constructor() { } constructor(x) { } // error ~~~~~~~~~~~~~~~~~~ -!!! Multiple constructor implementations are not allowed. +!!! error TS2392: Multiple constructor implementations are not allowed. } class D { constructor(x: T) { } constructor(x: T, y: T) { } // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Multiple constructor implementations are not allowed. +!!! error TS2392: Multiple constructor implementations are not allowed. } \ No newline at end of file diff --git a/tests/baselines/reference/classWithoutExplicitConstructor.errors.txt b/tests/baselines/reference/classWithoutExplicitConstructor.errors.txt index 8f21178ed72..981f38f017c 100644 --- a/tests/baselines/reference/classWithoutExplicitConstructor.errors.txt +++ b/tests/baselines/reference/classWithoutExplicitConstructor.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/classWithoutExplicitConstructor.ts(7,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/classWithoutExplicitConstructor.ts(15,10): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/classWithoutExplicitConstructor.ts (2 errors) ==== class C { x = 1 @@ -7,7 +11,7 @@ var c = new C(); var c2 = new C(null); // error ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class D { x = 2 @@ -17,4 +21,4 @@ var d = new D(); var d2 = new D(null); // error ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/classdecl.errors.txt b/tests/baselines/reference/classdecl.errors.txt index fcb0ad8b25a..e43be2f5ad0 100644 --- a/tests/baselines/reference/classdecl.errors.txt +++ b/tests/baselines/reference/classdecl.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/classdecl.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/classdecl.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/classdecl.ts(18,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/classdecl.ts(24,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/classdecl.ts (4 errors) ==== class a { //constructor (); @@ -12,17 +18,17 @@ public pv; public get d() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 30; } public set d() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public static get p2() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return { x: 30, y: 40 }; } @@ -30,7 +36,7 @@ } private static get p3() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "string"; } private pv3; diff --git a/tests/baselines/reference/clinterfaces.errors.txt b/tests/baselines/reference/clinterfaces.errors.txt index e187459e4f4..62e8fc08725 100644 --- a/tests/baselines/reference/clinterfaces.errors.txt +++ b/tests/baselines/reference/clinterfaces.errors.txt @@ -1,13 +1,19 @@ +tests/cases/compiler/clinterfaces.ts(3,15): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/clinterfaces.ts(5,11): error TS2300: Duplicate identifier 'D'. +tests/cases/compiler/clinterfaces.ts(12,7): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/clinterfaces.ts(20,11): error TS2300: Duplicate identifier 'Bar'. + + ==== tests/cases/compiler/clinterfaces.ts (4 errors) ==== module M { class C { } interface C { } ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. interface D { } class D { } ~ -!!! Duplicate identifier 'D'. +!!! error TS2300: Duplicate identifier 'D'. } interface Foo { @@ -16,7 +22,7 @@ class Foo{ ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. b: number; } @@ -26,7 +32,7 @@ interface Bar { ~~~ -!!! Duplicate identifier 'Bar'. +!!! error TS2300: Duplicate identifier 'Bar'. a: string; } diff --git a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt index 4d33163d693..e9001265feb 100644 --- a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged + + ==== tests/cases/compiler/cloduleSplitAcrossFiles_class.ts (0 errors) ==== class D { } ==== tests/cases/compiler/cloduleSplitAcrossFiles_module.ts (1 errors) ==== module D { ~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/baselines/reference/cloduleStaticMembers.errors.txt b/tests/baselines/reference/cloduleStaticMembers.errors.txt index ad1a3572c93..5b396c3be35 100644 --- a/tests/baselines/reference/cloduleStaticMembers.errors.txt +++ b/tests/baselines/reference/cloduleStaticMembers.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/cloduleStaticMembers.ts(6,13): error TS2341: Property 'Clod.x' is inaccessible. +tests/cases/compiler/cloduleStaticMembers.ts(7,13): error TS2304: Cannot find name 'x'. +tests/cases/compiler/cloduleStaticMembers.ts(10,13): error TS2304: Cannot find name 'y'. + + ==== tests/cases/compiler/cloduleStaticMembers.ts (3 errors) ==== class Clod { private static x = 10; @@ -6,14 +11,14 @@ module Clod { var p = Clod.x; ~~~~~~ -!!! Property 'Clod.x' is inaccessible. +!!! error TS2341: Property 'Clod.x' is inaccessible. var q = x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. var s = Clod.y; var t = y; ~ -!!! Cannot find name 'y'. +!!! error TS2304: Cannot find name 'y'. } \ No newline at end of file diff --git a/tests/baselines/reference/cloduleTest2.errors.txt b/tests/baselines/reference/cloduleTest2.errors.txt index a1355c0c9f1..9659b5b0d4c 100644 --- a/tests/baselines/reference/cloduleTest2.errors.txt +++ b/tests/baselines/reference/cloduleTest2.errors.txt @@ -1,10 +1,20 @@ +tests/cases/compiler/cloduleTest2.ts(4,13): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/cloduleTest2.ts(10,13): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/cloduleTest2.ts(18,7): error TS2339: Property 'bar' does not exist on type 'm3d'. +tests/cases/compiler/cloduleTest2.ts(19,7): error TS2339: Property 'y' does not exist on type 'm3d'. +tests/cases/compiler/cloduleTest2.ts(27,7): error TS2339: Property 'bar' does not exist on type 'm3d'. +tests/cases/compiler/cloduleTest2.ts(28,7): error TS2339: Property 'y' does not exist on type 'm3d'. +tests/cases/compiler/cloduleTest2.ts(33,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/cloduleTest2.ts(36,10): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/cloduleTest2.ts (8 errors) ==== module T1 { module m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void ; static bar(); } var r = new m3d(); // error ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. } module T2 { @@ -12,7 +22,7 @@ module m3d { export var y = 2; } var r = new m3d(); // error ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. } module T3 { @@ -22,10 +32,10 @@ r.foo(); r.bar(); // error ~~~ -!!! Property 'bar' does not exist on type 'm3d'. +!!! error TS2339: Property 'bar' does not exist on type 'm3d'. r.y; // error ~ -!!! Property 'y' does not exist on type 'm3d'. +!!! error TS2339: Property 'y' does not exist on type 'm3d'. } module T4 { @@ -35,19 +45,19 @@ r.foo(); r.bar(); // error ~~~ -!!! Property 'bar' does not exist on type 'm3d'. +!!! error TS2339: Property 'bar' does not exist on type 'm3d'. r.y; // error ~ -!!! Property 'y' does not exist on type 'm3d'. +!!! error TS2339: Property 'y' does not exist on type 'm3d'. } module m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void; static bar(); } var r = new m3d(); // error ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. declare class m4d extends m3d { } var r2 = new m4d(); // error ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt index d4c17e19bd1..7893afce829 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt @@ -1,11 +1,18 @@ +tests/cases/compiler/cloduleWithDuplicateMember1.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(10,16): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(13,21): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,21): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/compiler/cloduleWithDuplicateMember1.ts (5 errors) ==== class C { get x() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } static foo() { } @@ -14,13 +21,13 @@ module C { export var x = 1; ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } module C { export function foo() { } ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. export function x() { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt index 1eca71ea428..1118f23a98d 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt @@ -1,11 +1,16 @@ +tests/cases/compiler/cloduleWithDuplicateMember2.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/cloduleWithDuplicateMember2.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/cloduleWithDuplicateMember2.ts(10,21): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/compiler/cloduleWithDuplicateMember2.ts (3 errors) ==== class C { set x(y) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set y(z) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } module C { @@ -14,5 +19,5 @@ module C { export function x() { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/clodulesDerivedClasses.errors.txt b/tests/baselines/reference/clodulesDerivedClasses.errors.txt index 8ee9d5817a0..e4ce78e1875 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.errors.txt +++ b/tests/baselines/reference/clodulesDerivedClasses.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape': + Types of property 'Utils' are incompatible: + Type 'typeof Utils' is not assignable to type 'typeof Utils': + Property 'convert' is missing in type 'typeof Utils'. + + ==== tests/cases/compiler/clodulesDerivedClasses.ts (1 errors) ==== class Shape { id: number; @@ -9,10 +15,10 @@ class Path extends Shape { ~~~~ -!!! Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape': -!!! Types of property 'Utils' are incompatible: -!!! Type 'typeof Utils' is not assignable to type 'typeof Utils': -!!! Property 'convert' is missing in type 'typeof Utils'. +!!! error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape': +!!! error TS2418: Types of property 'Utils' are incompatible: +!!! error TS2418: Type 'typeof Utils' is not assignable to type 'typeof Utils': +!!! error TS2418: Property 'convert' is missing in type 'typeof Utils'. name: string; } diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt index 958ff48235c..f5291d3de43 100644 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/collisionArgumentsArrowFunctions.ts(1,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsArrowFunctions.ts(4,12): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + + ==== tests/cases/compiler/collisionArgumentsArrowFunctions.ts (2 errors) ==== var f1 = (i: number, ...arguments) => { //arguments is error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } var f12 = (arguments: number, ...rest) => { //arguments is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } var f1NoError = (arguments: number) => { // no error diff --git a/tests/baselines/reference/collisionArgumentsClassConstructor.errors.txt b/tests/baselines/reference/collisionArgumentsClassConstructor.errors.txt index bff94980b72..f2ec9429eb7 100644 --- a/tests/baselines/reference/collisionArgumentsClassConstructor.errors.txt +++ b/tests/baselines/reference/collisionArgumentsClassConstructor.errors.txt @@ -1,16 +1,23 @@ +tests/cases/compiler/collisionArgumentsClassConstructor.ts(3,28): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsClassConstructor.ts(8,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsClassConstructor.ts(30,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsClassConstructor.ts(53,25): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsClassConstructor.ts(61,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + + ==== tests/cases/compiler/collisionArgumentsClassConstructor.ts (5 errors) ==== // Constructors class c1 { constructor(i: number, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } } class c12 { constructor(arguments: number, ...rest) { // error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } } @@ -34,7 +41,7 @@ class c3 { constructor(public arguments: number, ...restParameters) { //arguments is error ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } } @@ -59,7 +66,7 @@ constructor(i: string, ...arguments); // no codegen no error constructor(i: any, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } } @@ -69,7 +76,7 @@ constructor(arguments: string, ...rest); // no codegen no error constructor(arguments: any, ...rest) { // error ~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any; // no error } } diff --git a/tests/baselines/reference/collisionArgumentsClassMethod.errors.txt b/tests/baselines/reference/collisionArgumentsClassMethod.errors.txt index 57342c1006d..38ad6867200 100644 --- a/tests/baselines/reference/collisionArgumentsClassMethod.errors.txt +++ b/tests/baselines/reference/collisionArgumentsClassMethod.errors.txt @@ -1,13 +1,19 @@ +tests/cases/compiler/collisionArgumentsClassMethod.ts(2,27): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsClassMethod.ts(5,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsClassMethod.ts(13,23): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsClassMethod.ts(18,16): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + + ==== tests/cases/compiler/collisionArgumentsClassMethod.ts (4 errors) ==== class c1 { public foo(i: number, ...arguments) { //arguments is error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } public foo1(arguments: number, ...rest) { //arguments is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } public fooNoError(arguments: number) { // no error @@ -17,14 +23,14 @@ public f4(i: string, ...arguments); // no codegen no error public f4(i: any, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } public f41(arguments: number, ...rest); // no codegen no error public f41(arguments: string, ...rest); // no codegen no error public f41(arguments: any, ...rest) { // error ~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any; // no error } public f4NoError(arguments: number); // no error diff --git a/tests/baselines/reference/collisionArgumentsFunction.errors.txt b/tests/baselines/reference/collisionArgumentsFunction.errors.txt index 9d76598113a..a557e9cbcba 100644 --- a/tests/baselines/reference/collisionArgumentsFunction.errors.txt +++ b/tests/baselines/reference/collisionArgumentsFunction.errors.txt @@ -1,13 +1,19 @@ +tests/cases/compiler/collisionArgumentsFunction.ts(2,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsFunction.ts(5,25): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsFunction.ts(25,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsFunction.ts(30,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + + ==== tests/cases/compiler/collisionArgumentsFunction.ts (4 errors) ==== // Functions function f1(arguments: number, ...restParameters) { //arguments is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } function f12(i: number, ...arguments) { //arguments is error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } function f1NoError(arguments: number) { // no error @@ -29,14 +35,14 @@ function f4(arguments: string, ...rest); // no codegen no error function f4(arguments: any, ...rest) { // error ~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any; // No error } function f42(i: number, ...arguments); // no codegen no error function f42(i: string, ...arguments); // no codegen no error function f42(i: any, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // No error } function f4NoError(arguments: number); // no error diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions.errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions.errors.txt index d4b8bbd9e94..fda61160717 100644 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions.errors.txt +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions.errors.txt @@ -1,13 +1,19 @@ +tests/cases/compiler/collisionArgumentsFunctionExpressions.ts(2,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsFunctionExpressions.ts(5,29): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsFunctionExpressions.ts(21,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +tests/cases/compiler/collisionArgumentsFunctionExpressions.ts(26,26): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + + ==== tests/cases/compiler/collisionArgumentsFunctionExpressions.ts (4 errors) ==== function foo() { function f1(arguments: number, ...restParameters) { //arguments is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } function f12(i: number, ...arguments) { //arguments is error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } function f1NoError(arguments: number) { // no error @@ -25,14 +31,14 @@ function f4(arguments: string, ...rest); // no codegen no error function f4(arguments: any, ...rest) { // error ~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any; // No error } function f42(i: number, ...arguments); // no codegen no error function f42(i: string, ...arguments); // no codegen no error function f42(i: any, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // No error } function f4NoError(arguments: number); // no error diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt index 23c7fe49f73..9ba074a1cae 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt +++ b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(14,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(24,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(32,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(41,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts (5 errors) ==== module M { export var x = 3; @@ -5,7 +12,7 @@ private y; set Z(M) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.y = x; } } @@ -16,7 +23,7 @@ private y; set Z(p) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var M = 10; this.y = x; } @@ -28,7 +35,7 @@ private y; set M(p) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.y = x; } } @@ -38,7 +45,7 @@ class f { get Z() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var M = 10; return x; } @@ -49,7 +56,7 @@ class e { get M() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return x; } } diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt index 2ed2ee5d10e..e782abd08b8 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(1,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(2,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. + + ==== tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts (2 errors) ==== import require = require('collisionExportsRequireAndAlias_file1'); // Error ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. import exports = require('collisionExportsRequireAndAlias_file3333'); // Error ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. export function foo() { require.bar(); } diff --git a/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt b/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt index 8fea5b475f2..ef0a9018f1d 100644 --- a/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(1,14): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(3,14): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. + + ==== tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts (2 errors) ==== export class require { ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. } export class exports { ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. } module m1 { class require { diff --git a/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt b/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt index 782e4958363..d421cbe4d4b 100644 --- a/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(1,13): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(5,13): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. + + ==== tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts (2 errors) ==== export enum require { // Error ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. _thisVal1, _thisVal2, } export enum exports { // Error ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. _thisVal1, _thisVal2, } diff --git a/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt b/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt index 49c6355c480..f52390ec28c 100644 --- a/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/collisionExportsRequireAndFunction.ts(1,17): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndFunction.ts(4,17): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. + + ==== tests/cases/compiler/collisionExportsRequireAndFunction.ts (2 errors) ==== export function exports() { ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. return 1; } export function require() { ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. return "require"; } module m1 { diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt index 9facc72da23..4207db04f53 100644 --- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(5,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(6,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. + + ==== tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts (2 errors) ==== export module m { export class c { @@ -5,10 +9,10 @@ } import exports = m.c; ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. import require = m.c; ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. new exports(); new require(); diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt b/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt index 4f1f9c4cd4d..cb11155718e 100644 --- a/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(1,15): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(10,15): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. + + ==== tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts (2 errors) ==== export module require { ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. export interface I { } export class C { @@ -12,7 +16,7 @@ } export module exports { ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. export interface I { } export class C { diff --git a/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt b/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt index d5106a0fe50..2efc84d5436 100644 --- a/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(3,5): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(4,5): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. + + ==== tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts (2 errors) ==== export function foo() { } var exports = 1; ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. var require = "require"; ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. module m1 { var exports = 0; var require = "require"; diff --git a/tests/baselines/reference/collisionRestParameterArrowFunctions.errors.txt b/tests/baselines/reference/collisionRestParameterArrowFunctions.errors.txt index 223565f664b..5c585e5a6c3 100644 --- a/tests/baselines/reference/collisionRestParameterArrowFunctions.errors.txt +++ b/tests/baselines/reference/collisionRestParameterArrowFunctions.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/collisionRestParameterArrowFunctions.ts(1,11): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. + + ==== tests/cases/compiler/collisionRestParameterArrowFunctions.ts (1 errors) ==== var f1 = (_i: number, ...restParameters) => { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } var f1NoError = (_i: number) => { // no error diff --git a/tests/baselines/reference/collisionRestParameterClassConstructor.errors.txt b/tests/baselines/reference/collisionRestParameterClassConstructor.errors.txt index d64474d412b..a30b6d11d4b 100644 --- a/tests/baselines/reference/collisionRestParameterClassConstructor.errors.txt +++ b/tests/baselines/reference/collisionRestParameterClassConstructor.errors.txt @@ -1,9 +1,14 @@ +tests/cases/compiler/collisionRestParameterClassConstructor.ts(3,17): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +tests/cases/compiler/collisionRestParameterClassConstructor.ts(25,17): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +tests/cases/compiler/collisionRestParameterClassConstructor.ts(45,17): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. + + ==== tests/cases/compiler/collisionRestParameterClassConstructor.ts (3 errors) ==== // Constructors class c1 { constructor(_i: number, ...restParameters) { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } } @@ -27,7 +32,7 @@ class c3 { constructor(public _i: number, ...restParameters) { //_i is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } } @@ -49,7 +54,7 @@ constructor(_i: string, ...rest); // no codegen no error constructor(_i: any, ...rest) { // error ~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i: any; // no error } } diff --git a/tests/baselines/reference/collisionRestParameterClassMethod.errors.txt b/tests/baselines/reference/collisionRestParameterClassMethod.errors.txt index 789901bc54e..ac3fb1a5561 100644 --- a/tests/baselines/reference/collisionRestParameterClassMethod.errors.txt +++ b/tests/baselines/reference/collisionRestParameterClassMethod.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/collisionRestParameterClassMethod.ts(2,16): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +tests/cases/compiler/collisionRestParameterClassMethod.ts(10,15): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. + + ==== tests/cases/compiler/collisionRestParameterClassMethod.ts (2 errors) ==== class c1 { public foo(_i: number, ...restParameters) { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } public fooNoError(_i: number) { // no error @@ -12,7 +16,7 @@ public f4(_i: string, ...rest); // no codegen no error public f4(_i: any, ...rest) { // error ~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i: any; // no error } diff --git a/tests/baselines/reference/collisionRestParameterFunction.errors.txt b/tests/baselines/reference/collisionRestParameterFunction.errors.txt index 3b3cb2a66ae..88a98b9c778 100644 --- a/tests/baselines/reference/collisionRestParameterFunction.errors.txt +++ b/tests/baselines/reference/collisionRestParameterFunction.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/collisionRestParameterFunction.ts(2,13): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +tests/cases/compiler/collisionRestParameterFunction.ts(21,13): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. + + ==== tests/cases/compiler/collisionRestParameterFunction.ts (2 errors) ==== // Functions function f1(_i: number, ...restParameters) { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } function f1NoError(_i: number) { // no error @@ -23,7 +27,7 @@ function f4(_i: string, ...rest); // no codegen no error function f4(_i: any, ...rest) { // error ~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. } function f4NoError(_i: number); // no error diff --git a/tests/baselines/reference/collisionRestParameterFunctionExpressions.errors.txt b/tests/baselines/reference/collisionRestParameterFunctionExpressions.errors.txt index 102693b2fcc..c2c237f98b3 100644 --- a/tests/baselines/reference/collisionRestParameterFunctionExpressions.errors.txt +++ b/tests/baselines/reference/collisionRestParameterFunctionExpressions.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/collisionRestParameterFunctionExpressions.ts(2,17): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +tests/cases/compiler/collisionRestParameterFunctionExpressions.ts(17,17): error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. + + ==== tests/cases/compiler/collisionRestParameterFunctionExpressions.ts (2 errors) ==== function foo() { function f1(_i: number, ...restParameters) { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } function f1NoError(_i: number) { // no error @@ -19,7 +23,7 @@ function f4(_i: string, ...rest); // no codegen no error function f4(_i: any, ...rest) { // error ~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. } function f4NoError(_i: number); // no error diff --git a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.errors.txt b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.errors.txt index cf43c5433e7..08df732096b 100644 --- a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.errors.txt +++ b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionRestParameterUnderscoreIUsage.ts(5,21): error TS2398: Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter. + + ==== tests/cases/compiler/collisionRestParameterUnderscoreIUsage.ts (1 errors) ==== declare var console: { log(msg?: string): void; }; var _i = "This is what I'd expect to see"; @@ -5,7 +8,7 @@ constructor(...args: any[]) { console.log(_i); // This should result in error ~~ -!!! Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter. +!!! error TS2398: Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter. } } new Foo(); \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt index 05b000677db..15ad1e0e8e7 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt @@ -1,17 +1,29 @@ +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(20,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(33,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(16,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(21,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(28,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts (10 errors) ==== function _super() { // No error } class Foo { get prop1(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // No error } return 10; } set prop1(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // No error } } @@ -19,46 +31,46 @@ class b extends Foo { get prop2(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // Should be error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. return 10; } set prop2(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // Should be error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { get prop2(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { function _super() { // Should be error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } return 10; } set prop2(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { function _super() { // Should be error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt index e6b0a98a4a7..8fce8f63f9d 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(12,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(20,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts (2 errors) ==== function _super() { // No error } @@ -14,7 +18,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { @@ -25,7 +29,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt index c4ba64b811c..e45219e43c3 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(13,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(22,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts (2 errors) ==== function _super() { // No error } @@ -15,7 +19,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } _super() { // No Error } @@ -27,7 +31,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } _super() { // No error diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt index 17ffba88341..6313eb2d830 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionSuperAndLocalFunctionInProperty.ts(14,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndLocalFunctionInProperty.ts (1 errors) ==== function _super() { // No error } @@ -16,7 +19,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt index 1a09105b30c..47c52c2582e 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt @@ -1,53 +1,65 @@ +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(16,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(21,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(27,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(13,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(17,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(23,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(29,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts (10 errors) ==== var _super = 10; // No Error class Foo { get prop1(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // No error return 10; } set prop1(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // No error } } class b extends Foo { get prop2(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. return 10; } set prop2(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { get prop2(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } return 10; } set prop2(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt index 7274264ffeb..4097187c3bf 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts(10,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts(17,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts (2 errors) ==== var _super = 10; // No Error class Foo { @@ -10,7 +14,7 @@ super(); var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { @@ -19,7 +23,7 @@ var x = () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.errors.txt index c7bed578121..72e19e20094 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/collisionSuperAndLocalVarInMethod.ts(9,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndLocalVarInMethod.ts(15,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndLocalVarInMethod.ts (2 errors) ==== var _super = 10; // No Error class Foo { @@ -9,7 +13,7 @@ public foo() { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { @@ -17,7 +21,7 @@ var x = () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.errors.txt index 481f080357e..6c786c83d8a 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionSuperAndLocalVarInProperty.ts(13,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndLocalVarInProperty.ts (1 errors) ==== var _super = 10; // No Error class Foo { @@ -13,7 +16,7 @@ doStuff: () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } public _super = 10; // No error diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.errors.txt b/tests/baselines/reference/collisionSuperAndNameResolution.errors.txt index 74fdc3ea68e..ea874952320 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.errors.txt +++ b/tests/baselines/reference/collisionSuperAndNameResolution.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionSuperAndNameResolution.ts(9,21): error TS2402: Expression resolves to '_super' that compiler uses to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndNameResolution.ts (1 errors) ==== var console: { log(message: any); @@ -9,6 +12,6 @@ x() { console.log(_super); // Error as this doesnt not resolve to user defined _super ~~~~~~ -!!! Expression resolves to '_super' that compiler uses to capture base class reference. +!!! error TS2402: Expression resolves to '_super' that compiler uses to capture base class reference. } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndParameter.errors.txt b/tests/baselines/reference/collisionSuperAndParameter.errors.txt index 4c6c0079fcc..b3dcdbf1be8 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.errors.txt +++ b/tests/baselines/reference/collisionSuperAndParameter.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/collisionSuperAndParameter.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndParameter.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionSuperAndParameter.ts(17,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndParameter.ts(21,7): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndParameter.ts(26,11): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndParameter.ts(32,19): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndParameter.ts(35,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndParameter.ts(52,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndParameter.ts(57,7): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndParameter.ts (9 errors) ==== class Foo { a() { @@ -12,29 +23,29 @@ } set c(_super: number) { // No error ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } class Foo2 extends Foo { x() { var lamda = (_super: number) => { // Error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. return x => this; // New scope. So should inject new _this capture } } y(_super: number) { // Error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } } set z(_super: number) { // Error ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } public prop3: { doStuff: (_super: number) => void; // no error - no code gen @@ -42,12 +53,12 @@ public prop4 = { doStuff: (_super: number) => { // should be error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } constructor(_super: number) { // should be error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } @@ -66,14 +77,14 @@ constructor(_super: string);// no code gen - no error constructor(_super: any) { // should be error ~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } y(_super: number); // no code gen - no error y(_super: string); // no code gen - no error y(_super: any) { // Error ~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } diff --git a/tests/baselines/reference/collisionSuperAndParameter1.errors.txt b/tests/baselines/reference/collisionSuperAndParameter1.errors.txt index ea3c3d9b420..361ecc1668e 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.errors.txt +++ b/tests/baselines/reference/collisionSuperAndParameter1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionSuperAndParameter1.ts(6,23): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndParameter1.ts (1 errors) ==== class Foo { } @@ -6,7 +9,7 @@ x() { var lambda = (_super: number) => { // Error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.errors.txt b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.errors.txt index 5eed3b86bbc..20e71ee1b7a 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.errors.txt +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.ts(5,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.ts(11,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.ts(19,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +tests/cases/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.ts(27,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. + + ==== tests/cases/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.ts (4 errors) ==== class a { } @@ -5,7 +11,7 @@ class b1 extends a { constructor(_super: number) { // should be error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } @@ -13,7 +19,7 @@ class b2 extends a { constructor(private _super: number) { // should be error ~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } @@ -23,7 +29,7 @@ constructor(_super: string);// no code gen - no error constructor(_super: any) { // should be error ~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } @@ -33,7 +39,7 @@ constructor(_super: string);// no code gen - no error constructor(private _super: any) { // should be error ~~~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.errors.txt index d12256f4199..96f05d6bfcc 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts(5,8): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts (1 errors) ==== module a { export var b = 10; @@ -5,4 +8,4 @@ var f = () => this; import _this = a; // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. \ No newline at end of file +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt index 0c6a7955e13..562f0d2a94a 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/collisionThisExpressionAndAmbientClassInGlobal.ts(4,13): error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndAmbientClassInGlobal.ts (1 errors) ==== declare class _this { // no error - as no code generation } var f = () => this; var a = new _this(); // Error ~~~~~ -!!! Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. \ No newline at end of file +!!! error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.errors.txt index 77439118c9a..412b2c8e18d 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/collisionThisExpressionAndAmbientVarInGlobal.ts(3,1): error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndAmbientVarInGlobal.ts (1 errors) ==== declare var _this: number; // no error as no code gen var f = () => this; _this = 10; // Error ~~~~~ -!!! Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. \ No newline at end of file +!!! error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.errors.txt index e4256953b85..26e37d4b327 100644 --- a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/collisionThisExpressionAndClassInGlobal.ts(1,7): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndClassInGlobal.ts (1 errors) ==== class _this { ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. } var f = () => this; \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.errors.txt index 8e31ac24291..e6c7b70216c 100644 --- a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/collisionThisExpressionAndEnumInGlobal.ts(1,6): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndEnumInGlobal.ts (1 errors) ==== enum _this { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. _thisVal1, _thisVal2, } diff --git a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.errors.txt index d76412ccad5..30fa4a444e2 100644 --- a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/collisionThisExpressionAndFunctionInGlobal.ts(1,10): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndFunctionInGlobal.ts (1 errors) ==== function _this() { //Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return 10; } var f = () => this; \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt index 5b84e2b779f..951a349be2b 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt @@ -1,13 +1,23 @@ +tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(34,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(5,21): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(15,21): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(25,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(35,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts (8 errors) ==== class class1 { get a(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -16,12 +26,12 @@ } set a(val: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -32,10 +42,10 @@ class class2 { get a(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); @@ -46,10 +56,10 @@ } set a(val: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.errors.txt index 17689e7d434..af1b43786a4 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/collisionThisExpressionAndLocalVarInConstructor.ts(5,21): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndLocalVarInConstructor.ts(14,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndLocalVarInConstructor.ts (2 errors) ==== class class1 { constructor() { @@ -5,7 +9,7 @@ doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -16,7 +20,7 @@ constructor() { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.errors.txt index 171f41fa107..3dd4f6e31a3 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionThisExpressionAndLocalVarInFunction.ts(5,9): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndLocalVarInFunction.ts (1 errors) ==== var console: { log(val: any); @@ -5,6 +8,6 @@ function x() { var _this = 5; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. x => { console.log(this.x); }; } \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.errors.txt index 5e734c998ae..3b6e8cb4cca 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionThisExpressionAndLocalVarInLambda.ts(5,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndLocalVarInLambda.ts (1 errors) ==== declare function alert(message?: any): void; @@ -5,7 +8,7 @@ doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.errors.txt index da6a81be808..018f3bb49d2 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/collisionThisExpressionAndLocalVarInMethod.ts(5,21): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndLocalVarInMethod.ts(11,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndLocalVarInMethod.ts (2 errors) ==== class a { method1() { @@ -5,7 +9,7 @@ doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -13,7 +17,7 @@ method2() { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return { doStuff: (callback) => () => { return callback(this); diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.errors.txt index 57a768213a3..4c166ac13ac 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/collisionThisExpressionAndLocalVarInProperty.ts(4,17): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndLocalVarInProperty.ts(12,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndLocalVarInProperty.ts (2 errors) ==== class class1 { public prop1 = { doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -14,7 +18,7 @@ constructor() { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. } public prop1 = { doStuff: (callback) => () => { diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.errors.txt index 307c829c986..df308b894f1 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.ts(7,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.ts(14,17): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.ts (2 errors) ==== class a { public foo() { @@ -7,7 +11,7 @@ public foo() { var _this = 10; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var f = () => super.foo(); } } @@ -16,7 +20,7 @@ var f = () => { var _this = 10; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return super.foo() } } diff --git a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.errors.txt index 7bd8fd289b4..bcc719972dc 100644 --- a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts(1,8): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts (1 errors) ==== module _this { //Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. class c { } } diff --git a/tests/baselines/reference/collisionThisExpressionAndNameResolution.errors.txt b/tests/baselines/reference/collisionThisExpressionAndNameResolution.errors.txt index 7684f5293bc..76875f46e46 100644 --- a/tests/baselines/reference/collisionThisExpressionAndNameResolution.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndNameResolution.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/collisionThisExpressionAndNameResolution.ts(8,25): error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndNameResolution.ts (1 errors) ==== var console : { log(message: any); @@ -8,7 +11,7 @@ function inner() { console.log(_this); // Error as this doesnt not resolve to user defined _this ~~~~~ -!!! Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. +!!! error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. return x => this; // New scope. So should inject new _this capture into function inner } } diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.errors.txt b/tests/baselines/reference/collisionThisExpressionAndParameter.errors.txt index 0e3d5945887..d2bf00483e4 100644 --- a/tests/baselines/reference/collisionThisExpressionAndParameter.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndParameter.errors.txt @@ -1,23 +1,33 @@ +tests/cases/compiler/collisionThisExpressionAndParameter.ts(4,24): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndParameter.ts(9,22): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndParameter.ts(13,7): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndParameter.ts(34,17): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndParameter.ts(46,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndParameter.ts(59,17): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndParameter.ts(69,7): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndParameter.ts(81,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndParameter.ts (8 errors) ==== class Foo { x() { var _this = 10; // Local var. No this capture in x(), so no conflict. function inner(_this: number) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return x => this; // New scope. So should inject new _this capture into function inner } } y() { var lamda = (_this: number) => { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return x => this; // New scope. So should inject new _this capture } } z(_this: number) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -40,7 +50,7 @@ class Foo1 { constructor(_this: number) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); @@ -54,7 +64,7 @@ function f1(_this: number) { ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. x => { console.log(this.x); }; } @@ -69,7 +79,7 @@ constructor(_this: number); // no code gen - no error constructor(_this: any) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); @@ -81,7 +91,7 @@ z(_this: number); // no code gen - no error z(_this: any) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -95,7 +105,7 @@ function f3(_this: string); // no code gen - no error function f3(_this: any) { ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. x => { console.log(this.x); }; } diff --git a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.errors.txt b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.errors.txt index bc60fffd80c..fda0ebc930d 100644 --- a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.errors.txt @@ -1,8 +1,14 @@ +tests/cases/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.ts(2,17): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.ts(10,25): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.ts(20,17): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +tests/cases/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.ts(30,25): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.ts (4 errors) ==== class Foo2 { constructor(_this: number) { //Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -12,7 +18,7 @@ class Foo3 { constructor(private _this: number) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -24,7 +30,7 @@ constructor(_this: string); // No code gen - no error constructor(_this: any) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -36,7 +42,7 @@ constructor(_this: string); // No code gen - no error constructor(private _this: any) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } diff --git a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.errors.txt index c1c7e43f927..31e37f9c255 100644 --- a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/collisionThisExpressionAndVarInGlobal.ts(1,5): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. + + ==== tests/cases/compiler/collisionThisExpressionAndVarInGlobal.ts (1 errors) ==== var _this = 1; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var f = () => this; \ No newline at end of file diff --git a/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt b/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt index d426c3f5eb0..5d0d67067e5 100644 --- a/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt +++ b/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(10,1): error TS2323: Type 'string' is not assignable to type 'boolean'. +tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(11,1): error TS2323: Type 'number' is not assignable to type 'boolean'. +tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(13,1): error TS2323: Type 'boolean' is not assignable to type 'number'. +tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(14,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(16,1): error TS2323: Type 'boolean' is not assignable to type 'string'. +tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts(17,1): error TS2323: Type 'number' is not assignable to type 'string'. + + ==== tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts (6 errors) ==== var BOOLEAN: boolean; var NUMBER: number; @@ -10,22 +18,22 @@ //Expect errors when the results type is different form the second operand resultIsBoolean = (BOOLEAN, STRING); ~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2323: Type 'string' is not assignable to type 'boolean'. resultIsBoolean = (BOOLEAN, NUMBER); ~~~~~~~~~~~~~~~ -!!! Type 'number' is not assignable to type 'boolean'. +!!! error TS2323: Type 'number' is not assignable to type 'boolean'. resultIsNumber = (NUMBER, BOOLEAN); ~~~~~~~~~~~~~~ -!!! Type 'boolean' is not assignable to type 'number'. +!!! error TS2323: Type 'boolean' is not assignable to type 'number'. resultIsNumber = (NUMBER, STRING); ~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. resultIsString = (STRING, BOOLEAN); ~~~~~~~~~~~~~~ -!!! Type 'boolean' is not assignable to type 'string'. +!!! error TS2323: Type 'boolean' is not assignable to type 'string'. resultIsString = (STRING, NUMBER); ~~~~~~~~~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt b/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt index e8a8027eab8..75cd76e407e 100644 --- a/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt +++ b/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts(6,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts(12,9): error TS2323: Type 'T2' is not assignable to type 'T1'. + + ==== tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts (2 errors) ==== //Expect to have compiler errors //Comma operator in fuction arguments and return @@ -6,7 +10,7 @@ } var resultIsString: number = foo(1, "123"); //error here ~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. //TypeParameters function foo1() { @@ -14,5 +18,5 @@ var y: T2; var result: T1 = (x, y); //error here ~~~~~~ -!!! Type 'T2' is not assignable to type 'T1'. +!!! error TS2323: Type 'T2' is not assignable to type 'T1'. } \ No newline at end of file diff --git a/tests/baselines/reference/commaOperatorWithoutOperand.errors.txt b/tests/baselines/reference/commaOperatorWithoutOperand.errors.txt index a213d416492..7120a827042 100644 --- a/tests/baselines/reference/commaOperatorWithoutOperand.errors.txt +++ b/tests/baselines/reference/commaOperatorWithoutOperand.errors.txt @@ -1,3 +1,17 @@ +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(9,7): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(10,11): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(11,10): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(12,10): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(13,10): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(16,2): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(17,2): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(18,2): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(19,2): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(20,2): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(23,3): error TS1109: Expression expected. +tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts(23,5): error TS1109: Expression expected. + + ==== tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts (12 errors) ==== var ANY: any; var BOOLEAN: boolean; @@ -9,40 +23,40 @@ // Missing the second operand (ANY, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (BOOLEAN, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (NUMBER, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (STRING, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (OBJECT, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // Missing the first operand (, ANY); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (, BOOLEAN); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (, NUMBER); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (, STRING); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (, OBJECT); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // Missing all operands ( , ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnClassAccessor1.errors.txt b/tests/baselines/reference/commentOnClassAccessor1.errors.txt index b434f9fc57d..4ec9a1e1052 100644 --- a/tests/baselines/reference/commentOnClassAccessor1.errors.txt +++ b/tests/baselines/reference/commentOnClassAccessor1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/commentOnClassAccessor1.ts(5,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/commentOnClassAccessor1.ts (1 errors) ==== class C { /** @@ -5,5 +8,5 @@ */ get bar(): number { return 1;} ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/commentOnClassAccessor2.errors.txt b/tests/baselines/reference/commentOnClassAccessor2.errors.txt index 137490042a7..959a708e05c 100644 --- a/tests/baselines/reference/commentOnClassAccessor2.errors.txt +++ b/tests/baselines/reference/commentOnClassAccessor2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/commentOnClassAccessor2.ts(5,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/commentOnClassAccessor2.ts(10,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/commentOnClassAccessor2.ts (2 errors) ==== class C { /** @@ -5,12 +9,12 @@ */ get bar(): number { return 1;} ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. /** * Setter. */ set bar(v) { } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement1.errors.txt b/tests/baselines/reference/commentOnImportStatement1.errors.txt index 580b96bd61e..26a725a8f7c 100644 --- a/tests/baselines/reference/commentOnImportStatement1.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find external module './foo'. + + ==== tests/cases/compiler/commentOnImportStatement1.ts (1 errors) ==== /* Copyright */ import foo = require('./foo'); ~~~~~~~ -!!! Cannot find external module './foo'. +!!! error TS2307: Cannot find external module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement2.errors.txt b/tests/baselines/reference/commentOnImportStatement2.errors.txt index 5b600cf4bcf..a2ea6c19d6e 100644 --- a/tests/baselines/reference/commentOnImportStatement2.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement2.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find external module './foo'. + + ==== tests/cases/compiler/commentOnImportStatement2.ts (1 errors) ==== /* not copyright */ import foo = require('./foo'); ~~~~~~~ -!!! Cannot find external module './foo'. \ No newline at end of file +!!! error TS2307: Cannot find external module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement3.errors.txt b/tests/baselines/reference/commentOnImportStatement3.errors.txt index dede9f0f713..427bcf3aef7 100644 --- a/tests/baselines/reference/commentOnImportStatement3.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement3.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find external module './foo'. + + ==== tests/cases/compiler/commentOnImportStatement3.ts (1 errors) ==== /* copyright */ /* not copyright */ import foo = require('./foo'); ~~~~~~~ -!!! Cannot find external module './foo'. \ No newline at end of file +!!! error TS2307: Cannot find external module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/commentsOnObjectLiteral1.errors.txt b/tests/baselines/reference/commentsOnObjectLiteral1.errors.txt index dd737b2b54a..3c80588c2fa 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral1.errors.txt +++ b/tests/baselines/reference/commentsOnObjectLiteral1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/commentsOnObjectLiteral1.ts(1,14): error TS2304: Cannot find name 'makeClass'. + + ==== tests/cases/compiler/commentsOnObjectLiteral1.ts (1 errors) ==== var Person = makeClass( ~~~~~~~~~ -!!! Cannot find name 'makeClass'. +!!! error TS2304: Cannot find name 'makeClass'. /** @scope Person */ diff --git a/tests/baselines/reference/commentsOnObjectLiteral2.errors.txt b/tests/baselines/reference/commentsOnObjectLiteral2.errors.txt index aa338e31db4..2a2394ced48 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral2.errors.txt +++ b/tests/baselines/reference/commentsOnObjectLiteral2.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/commentsOnObjectLiteral2.ts(1,14): error TS2304: Cannot find name 'makeClass'. + + ==== tests/cases/compiler/commentsOnObjectLiteral2.ts (1 errors) ==== var Person = makeClass( ~~~~~~~~~ -!!! Cannot find name 'makeClass'. +!!! error TS2304: Cannot find name 'makeClass'. { /** This is just another way to define a constructor. diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt index c866a79e23c..2563baf1c72 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt @@ -1,3 +1,101 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(35,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(36,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(37,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(38,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(39,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(45,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(46,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(47,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(48,12): error TS2365: Operator '<' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(52,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(53,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(54,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(55,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(56,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(60,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(61,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(62,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(63,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(64,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(65,12): error TS2365: Operator '>' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(69,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(70,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(71,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(72,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(73,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(77,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(78,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(79,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(80,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(81,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(82,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(86,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(87,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(88,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(89,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(90,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(91,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(94,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(95,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(96,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(97,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(98,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(99,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(103,12): error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(104,12): error TS2365: Operator '==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(105,12): error TS2365: Operator '==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(106,12): error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(107,12): error TS2365: Operator '==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(108,12): error TS2365: Operator '==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(111,12): error TS2365: Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(112,12): error TS2365: Operator '==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(113,12): error TS2365: Operator '==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(114,12): error TS2365: Operator '==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(115,12): error TS2365: Operator '==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(116,12): error TS2365: Operator '==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(120,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(121,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(122,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(123,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(124,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(125,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(128,12): error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(129,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(130,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(131,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(132,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(133,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(137,12): error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(138,12): error TS2365: Operator '===' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(139,12): error TS2365: Operator '===' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(140,12): error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(141,12): error TS2365: Operator '===' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(142,12): error TS2365: Operator '===' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(145,12): error TS2365: Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(146,12): error TS2365: Operator '===' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(147,12): error TS2365: Operator '===' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(148,12): error TS2365: Operator '===' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(149,12): error TS2365: Operator '===' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(150,12): error TS2365: Operator '===' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(154,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(155,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(156,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(157,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(158,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(159,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(162,12): error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(163,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(164,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(165,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(166,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(167,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts (96 errors) ==== class Base { public a: string; @@ -35,327 +133,327 @@ // operator < var r1a1 = a1 < b1; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r1a3 = a3 < b3; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r1a4 = a4 < b4; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r1a5 = a5 < b5; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r1a6 = a6 < b6; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r1a7 = a7 < b7; var r1b1 = b1 < a1; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r1b3 = b3 < a3; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r1b4 = b4 < a4; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r1b5 = b5 < a5; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r1b6 = b6 < a6; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r1b7 = b7 < a7; // operator > var r2a1 = a1 > b1; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r2a3 = a3 > b3; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r2a4 = a4 > b4; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r2a5 = a5 > b5; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r2a6 = a6 > b6; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r2a7 = a7 > b7; var r2b1 = b1 > a1; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r2b3 = b3 > a3; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r2b4 = b4 > a4; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r2b5 = b5 > a5; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r2b6 = b6 > a6; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r2b7 = b7 > a7; // operator <= var r3a1 = a1 <= b1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r3a3 = a3 <= b3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r3a4 = a4 <= b4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r3a5 = a5 <= b5; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r3a6 = a6 <= b6; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r3a7 = a7 <= b7; var r3b1 = b1 <= a1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r3b3 = b3 <= a3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r3b4 = b4 <= a4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r3b5 = b5 <= a5; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r3b6 = b6 <= a6; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r3b7 = b7 <= a7; // operator >= var r4a1 = a1 >= b1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r4a3 = a3 >= b3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r4a4 = a4 >= b4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r4a5 = a5 >= b5; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r4a6 = a6 >= b6; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r4a7 = a7 >= b7; var r4b1 = b1 >= a1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r4b3 = b3 >= a3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r4b4 = b4 >= a4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r4b5 = b5 >= a5; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r4b6 = b6 >= a6; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r4b7 = b7 >= a7; // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r5a3 = a3 == b3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r5a4 = a4 == b4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r5a5 = a5 == b5; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r5a6 = a6 == b6; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r5a7 = a7 == b7; var r5b1 = b1 == a1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r5b3 = b3 == a3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r5b4 = b4 == a4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r5b5 = b5 == a5; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r5b6 = b6 == a6; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r5b7 = b7 == a7; // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r6a3 = a3 != b3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r6a4 = a4 != b4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r6a5 = a5 != b5; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r6a6 = a6 != b6; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r6a7 = a7 != b7; var r6b1 = b1 != a1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r6b3 = b3 != a3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r6b4 = b4 != a4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r6b5 = b5 != a5; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r6b6 = b6 != a6; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r6b7 = b7 != a7; // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r7a4 = a4 === b4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r7a5 = a5 === b5; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r7a6 = a6 === b6; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r7a7 = a7 === b7; var r7b1 = b1 === a1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r7b4 = b4 === a4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r7b5 = b5 === a5; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r7b6 = b6 === a6; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r7b7 = b7 === a7; // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r8a4 = a4 !== b4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r8a5 = a5 !== b5; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r8a6 = a6 !== b6; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r8a7 = a7 !== b7; var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r8b4 = b4 !== a4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r8b5 = b5 !== a5; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r8b6 = b6 !== a6; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r8b7 = b7 !== a7; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt index d0cfd9493b8..cdfd199c0fa 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt @@ -1,3 +1,101 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(35,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(36,12): error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(37,12): error TS2365: Operator '<' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(38,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => C'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(39,12): error TS2365: Operator '<' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(45,12): error TS2365: Operator '<' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(46,12): error TS2365: Operator '<' cannot be applied to types 'new () => C' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(47,12): error TS2365: Operator '<' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(48,12): error TS2365: Operator '<' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(52,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(53,12): error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(54,12): error TS2365: Operator '>' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(55,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => C'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(56,12): error TS2365: Operator '>' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(60,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(61,12): error TS2365: Operator '>' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(62,12): error TS2365: Operator '>' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(63,12): error TS2365: Operator '>' cannot be applied to types 'new () => C' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(64,12): error TS2365: Operator '>' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(65,12): error TS2365: Operator '>' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(69,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(70,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(71,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(72,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => C'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(73,12): error TS2365: Operator '<=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(77,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(78,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(79,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(80,12): error TS2365: Operator '<=' cannot be applied to types 'new () => C' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(81,12): error TS2365: Operator '<=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(82,12): error TS2365: Operator '<=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(86,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(87,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(88,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(89,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => C'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(90,12): error TS2365: Operator '>=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(91,12): error TS2365: Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(94,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(95,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(96,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(97,12): error TS2365: Operator '>=' cannot be applied to types 'new () => C' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(98,12): error TS2365: Operator '>=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(99,12): error TS2365: Operator '>=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(103,12): error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(104,12): error TS2365: Operator '==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(105,12): error TS2365: Operator '==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(106,12): error TS2365: Operator '==' cannot be applied to types 'new () => Base' and 'new () => C'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(107,12): error TS2365: Operator '==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(108,12): error TS2365: Operator '==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(111,12): error TS2365: Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(112,12): error TS2365: Operator '==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(113,12): error TS2365: Operator '==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(114,12): error TS2365: Operator '==' cannot be applied to types 'new () => C' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(115,12): error TS2365: Operator '==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(116,12): error TS2365: Operator '==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(120,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(121,12): error TS2365: Operator '!=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(122,12): error TS2365: Operator '!=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(123,12): error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and 'new () => C'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(124,12): error TS2365: Operator '!=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(125,12): error TS2365: Operator '!=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(128,12): error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(129,12): error TS2365: Operator '!=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(130,12): error TS2365: Operator '!=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(131,12): error TS2365: Operator '!=' cannot be applied to types 'new () => C' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(132,12): error TS2365: Operator '!=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(133,12): error TS2365: Operator '!=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(137,12): error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(138,12): error TS2365: Operator '===' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(139,12): error TS2365: Operator '===' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(140,12): error TS2365: Operator '===' cannot be applied to types 'new () => Base' and 'new () => C'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(141,12): error TS2365: Operator '===' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(142,12): error TS2365: Operator '===' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(145,12): error TS2365: Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(146,12): error TS2365: Operator '===' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(147,12): error TS2365: Operator '===' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(148,12): error TS2365: Operator '===' cannot be applied to types 'new () => C' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(149,12): error TS2365: Operator '===' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(150,12): error TS2365: Operator '===' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(154,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(155,12): error TS2365: Operator '!==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(156,12): error TS2365: Operator '!==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(157,12): error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and 'new () => C'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(158,12): error TS2365: Operator '!==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(159,12): error TS2365: Operator '!==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(162,12): error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(163,12): error TS2365: Operator '!==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(164,12): error TS2365: Operator '!==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(165,12): error TS2365: Operator '!==' cannot be applied to types 'new () => C' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(166,12): error TS2365: Operator '!==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(167,12): error TS2365: Operator '!==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts (96 errors) ==== class Base { public a: string; @@ -35,327 +133,327 @@ // operator < var r1a1 = a1 < b1; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r1a3 = a3 < b3; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r1a4 = a4 < b4; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => C'. var r1a5 = a5 < b5; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r1a6 = a6 < b6; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r1a7 = a7 < b7; var r1b1 = b1 < a1; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r1b3 = b3 < a3; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r1b4 = b4 < a4; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new () => C' and 'new () => Base'. var r1b5 = b5 < a5; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r1b6 = b6 < a6; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r1b7 = b7 < a7; // operator > var r2a1 = a1 > b1; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r2a3 = a3 > b3; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r2a4 = a4 > b4; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => C'. var r2a5 = a5 > b5; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r2a6 = a6 > b6; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r2a7 = a7 > b7; var r2b1 = b1 > a1; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r2b3 = b3 > a3; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r2b4 = b4 > a4; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new () => C' and 'new () => Base'. var r2b5 = b5 > a5; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r2b6 = b6 > a6; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r2b7 = b7 > a7; // operator <= var r3a1 = a1 <= b1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r3a3 = a3 <= b3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r3a4 = a4 <= b4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => C'. var r3a5 = a5 <= b5; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r3a6 = a6 <= b6; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r3a7 = a7 <= b7; var r3b1 = b1 <= a1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r3b3 = b3 <= a3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r3b4 = b4 <= a4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => C' and 'new () => Base'. var r3b5 = b5 <= a5; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r3b6 = b6 <= a6; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r3b7 = b7 <= a7; // operator >= var r4a1 = a1 >= b1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r4a3 = a3 >= b3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r4a4 = a4 >= b4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => C'. var r4a5 = a5 >= b5; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r4a6 = a6 >= b6; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r4a7 = a7 >= b7; var r4b1 = b1 >= a1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r4b3 = b3 >= a3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r4b4 = b4 >= a4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => C' and 'new () => Base'. var r4b5 = b5 >= a5; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r4b6 = b6 >= a6; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r4b7 = b7 >= a7; // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r5a3 = a3 == b3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r5a4 = a4 == b4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '==' cannot be applied to types 'new () => Base' and 'new () => C'. var r5a5 = a5 == b5; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r5a6 = a6 == b6; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r5a7 = a7 == b7; var r5b1 = b1 == a1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r5b3 = b3 == a3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r5b4 = b4 == a4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new () => C' and 'new () => Base'. var r5b5 = b5 == a5; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r5b6 = b6 == a6; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r5b7 = b7 == a7; // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r6a3 = a3 != b3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r6a4 = a4 != b4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and 'new () => C'. var r6a5 = a5 != b5; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r6a6 = a6 != b6; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r6a7 = a7 != b7; var r6b1 = b1 != a1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r6b3 = b3 != a3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r6b4 = b4 != a4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new () => C' and 'new () => Base'. var r6b5 = b5 != a5; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r6b6 = b6 != a6; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r6b7 = b7 != a7; // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r7a4 = a4 === b4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '===' cannot be applied to types 'new () => Base' and 'new () => C'. var r7a5 = a5 === b5; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r7a6 = a6 === b6; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r7a7 = a7 === b7; var r7b1 = b1 === a1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r7b4 = b4 === a4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new () => C' and 'new () => Base'. var r7b5 = b5 === a5; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r7b6 = b6 === a6; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r7b7 = b7 === a7; // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r8a4 = a4 !== b4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and 'new () => C'. var r8a5 = a5 !== b5; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r8a6 = a6 !== b6; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r8a7 = a7 !== b7; var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r8b4 = b4 !== a4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new () => C' and 'new () => Base'. var r8b5 = b5 !== a5; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r8b6 = b6 !== a6; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r8b7 = b7 !== a7; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt index dda19ceaa18..5bb7772e75f 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt @@ -1,3 +1,69 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(26,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(27,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(28,12): error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(29,12): error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(31,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(33,12): error TS2365: Operator '<' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(34,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(37,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(38,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(39,12): error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(40,12): error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(42,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(43,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(44,12): error TS2365: Operator '>' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(45,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(48,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(49,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(50,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(51,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(53,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(54,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(55,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(56,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(59,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(60,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(61,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(62,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(64,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(65,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(66,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(67,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(70,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(71,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(72,12): error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(73,12): error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(75,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(76,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(77,12): error TS2365: Operator '==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(78,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(81,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(82,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(83,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(84,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(86,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(87,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(88,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(89,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(92,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(93,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(94,12): error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(95,12): error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(97,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(98,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(99,12): error TS2365: Operator '===' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(100,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(103,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(104,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(105,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(106,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(108,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(109,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(110,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(111,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts (64 errors) ==== class Base { public a: string; @@ -26,215 +92,215 @@ // operator < var r1a1 = a1 < b1; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r1a3 = a3 < b3; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r1a4 = a4 < b4; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r1b1 = b1 < a1; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r1b3 = b3 < a3; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r1b4 = b4 < a4; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator > var r2a1 = a1 > b1; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r2a3 = a3 > b3; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r2a4 = a4 > b4; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r2b1 = b1 > a1; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r2b3 = b3 > a3; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r2b4 = b4 > a4; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator <= var r3a1 = a1 <= b1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r3a3 = a3 <= b3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r3a4 = a4 <= b4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r3b1 = b1 <= a1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r3b3 = b3 <= a3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r3b4 = b4 <= a4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator >= var r4a1 = a1 >= b1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r4a3 = a3 >= b3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r4a4 = a4 >= b4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r4b1 = b1 >= a1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r4b3 = b3 >= a3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r4b4 = b4 >= a4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r5a3 = a3 == b3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r5a4 = a4 == b4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r5b1 = b1 == a1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r5b3 = b3 == a3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r5b4 = b4 == a4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r6a3 = a3 != b3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r6a4 = a4 != b4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r6b1 = b1 != a1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r6b3 = b3 != a3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r6b4 = b4 != a4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r7a4 = a4 === b4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r7b1 = b1 === a1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r7b4 = b4 === a4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r8a4 = a4 !== b4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r8b4 = b4 !== a4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. \ No newline at end of file +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt index 79da7a1389b..908f97345a1 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(28,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts (1 errors) ==== class Base { public a: string; @@ -28,7 +31,7 @@ var a6: { fn(x: T, y: U): T }; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b6: { fn(x: Base, y: C): Base }; // operator < diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt index 870a40fa0a3..5364fea089c 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(28,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts (1 errors) ==== class Base { public a: string; @@ -28,7 +31,7 @@ var a6: { new (x: T, y: U): T }; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b6: { new (x: Base, y: C): Base }; // operator < diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt index fd3be68dee0..5e700926eb5 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt @@ -1,3 +1,21 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(13,11): error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(14,11): error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(17,11): error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(18,11): error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(21,11): error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(22,11): error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(25,11): error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(26,11): error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(29,11): error TS2365: Operator '==' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(30,11): error TS2365: Operator '==' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(33,11): error TS2365: Operator '!=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(34,11): error TS2365: Operator '!=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(37,11): error TS2365: Operator '===' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(38,11): error TS2365: Operator '===' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(41,11): error TS2365: Operator '!==' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(42,11): error TS2365: Operator '!==' cannot be applied to types 'B1' and 'A1'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts (16 errors) ==== interface A1 { b?: number; @@ -13,63 +31,63 @@ // operator < var ra1 = a < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. var ra2 = b < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. // operator > var rb1 = a > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. var rb2 = b > a; ~~~~~ -!!! Operator '>' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. // operator <= var rc1 = a <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. var rc2 = b <= a; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. // operator >= var rd1 = a >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. var rd2 = b >= a; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. // operator == var re1 = a == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '==' cannot be applied to types 'A1' and 'B1'. var re2 = b == a; ~~~~~~ -!!! Operator '==' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '==' cannot be applied to types 'B1' and 'A1'. // operator != var rf1 = a != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '!=' cannot be applied to types 'A1' and 'B1'. var rf2 = b != a; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '!=' cannot be applied to types 'B1' and 'A1'. // operator === var rg1 = a === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '===' cannot be applied to types 'A1' and 'B1'. var rg2 = b === a; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '===' cannot be applied to types 'B1' and 'A1'. // operator !== var rh1 = a !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '!==' cannot be applied to types 'A1' and 'B1'. var rh2 = b !== a; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'B1' and 'A1'. \ No newline at end of file +!!! error TS2365: Operator '!==' cannot be applied to types 'B1' and 'A1'. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt index c8d6dd24fa3..10033087946 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt @@ -1,3 +1,37 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(23,12): error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(24,12): error TS2365: Operator '<' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(26,12): error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(27,12): error TS2365: Operator '<' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(30,12): error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(31,12): error TS2365: Operator '>' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(33,12): error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(34,12): error TS2365: Operator '>' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(37,12): error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(38,12): error TS2365: Operator '<=' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(40,12): error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(41,12): error TS2365: Operator '<=' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(44,12): error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(45,12): error TS2365: Operator '>=' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(47,12): error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(48,12): error TS2365: Operator '>=' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(51,12): error TS2365: Operator '==' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(52,12): error TS2365: Operator '==' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(54,12): error TS2365: Operator '==' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(55,12): error TS2365: Operator '==' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(58,12): error TS2365: Operator '!=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(59,12): error TS2365: Operator '!=' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(61,12): error TS2365: Operator '!=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(62,12): error TS2365: Operator '!=' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(65,12): error TS2365: Operator '===' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(66,12): error TS2365: Operator '===' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(68,12): error TS2365: Operator '===' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(69,12): error TS2365: Operator '===' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(72,12): error TS2365: Operator '!==' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(73,12): error TS2365: Operator '!==' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(75,12): error TS2365: Operator '!==' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(76,12): error TS2365: Operator '!==' cannot be applied to types 'B2' and 'A2'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts (32 errors) ==== class A1 { public a: number; @@ -23,119 +57,119 @@ // operator < var r1a1 = a1 < b1; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '<' cannot be applied to types 'A2' and 'B2'. var r1b1 = b1 < a1; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '<' cannot be applied to types 'B2' and 'A2'. // operator > var r2a1 = a1 > b1; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '>' cannot be applied to types 'A2' and 'B2'. var r2b1 = b1 > a1; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '>' cannot be applied to types 'B2' and 'A2'. // operator <= var r3a1 = a1 <= b1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '<=' cannot be applied to types 'A2' and 'B2'. var r3b1 = b1 <= a1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '<=' cannot be applied to types 'B2' and 'A2'. // operator >= var r4a1 = a1 >= b1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '>=' cannot be applied to types 'A2' and 'B2'. var r4b1 = b1 >= a1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '>=' cannot be applied to types 'B2' and 'A2'. // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '==' cannot be applied to types 'A1' and 'B1'. var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '==' cannot be applied to types 'A2' and 'B2'. var r5b1 = b1 == a1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '==' cannot be applied to types 'B1' and 'A1'. var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '==' cannot be applied to types 'B2' and 'A2'. // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '!=' cannot be applied to types 'A1' and 'B1'. var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '!=' cannot be applied to types 'A2' and 'B2'. var r6b1 = b1 != a1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '!=' cannot be applied to types 'B1' and 'A1'. var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '!=' cannot be applied to types 'B2' and 'A2'. // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '===' cannot be applied to types 'A1' and 'B1'. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '===' cannot be applied to types 'A2' and 'B2'. var r7b1 = b1 === a1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '===' cannot be applied to types 'B1' and 'A1'. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '===' cannot be applied to types 'B2' and 'A2'. // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '!==' cannot be applied to types 'A1' and 'B1'. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '!==' cannot be applied to types 'A2' and 'B2'. var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '!==' cannot be applied to types 'B1' and 'A1'. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'B2' and 'A2'. \ No newline at end of file +!!! error TS2365: Operator '!==' cannot be applied to types 'B2' and 'A2'. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt index d614662c0a1..ec511069130 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt @@ -1,3 +1,149 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(10,12): error TS2365: Operator '<' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(11,12): error TS2365: Operator '<' cannot be applied to types 'number' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(12,12): error TS2365: Operator '<' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(15,12): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(16,12): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(17,12): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(18,12): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(20,12): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(21,12): error TS2365: Operator '<' cannot be applied to types 'string' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(22,12): error TS2365: Operator '<' cannot be applied to types 'string' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(23,12): error TS2365: Operator '<' cannot be applied to types 'string' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(25,12): error TS2365: Operator '<' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(26,12): error TS2365: Operator '<' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(27,12): error TS2365: Operator '<' cannot be applied to types 'void' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(28,12): error TS2365: Operator '<' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(31,12): error TS2365: Operator '<' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(32,12): error TS2365: Operator '<' cannot be applied to types 'E' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(33,12): error TS2365: Operator '<' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(36,12): error TS2365: Operator '>' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(37,12): error TS2365: Operator '>' cannot be applied to types 'number' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(38,12): error TS2365: Operator '>' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(41,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(42,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(43,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(44,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(46,12): error TS2365: Operator '>' cannot be applied to types 'string' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(47,12): error TS2365: Operator '>' cannot be applied to types 'string' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(48,12): error TS2365: Operator '>' cannot be applied to types 'string' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(49,12): error TS2365: Operator '>' cannot be applied to types 'string' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(51,12): error TS2365: Operator '>' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(52,12): error TS2365: Operator '>' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(53,12): error TS2365: Operator '>' cannot be applied to types 'void' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(54,12): error TS2365: Operator '>' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(57,12): error TS2365: Operator '>' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(58,12): error TS2365: Operator '>' cannot be applied to types 'E' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(59,12): error TS2365: Operator '>' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(62,12): error TS2365: Operator '<=' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(63,12): error TS2365: Operator '<=' cannot be applied to types 'number' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(64,12): error TS2365: Operator '<=' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(67,12): error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(68,12): error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(69,12): error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(70,12): error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(72,12): error TS2365: Operator '<=' cannot be applied to types 'string' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(73,12): error TS2365: Operator '<=' cannot be applied to types 'string' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(74,12): error TS2365: Operator '<=' cannot be applied to types 'string' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(75,12): error TS2365: Operator '<=' cannot be applied to types 'string' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(77,12): error TS2365: Operator '<=' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(78,12): error TS2365: Operator '<=' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(79,12): error TS2365: Operator '<=' cannot be applied to types 'void' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(80,12): error TS2365: Operator '<=' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(83,12): error TS2365: Operator '<=' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(84,12): error TS2365: Operator '<=' cannot be applied to types 'E' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(85,12): error TS2365: Operator '<=' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(88,12): error TS2365: Operator '>=' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(89,12): error TS2365: Operator '>=' cannot be applied to types 'number' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(90,12): error TS2365: Operator '>=' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(93,12): error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(94,12): error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(95,12): error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(96,12): error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(98,12): error TS2365: Operator '>=' cannot be applied to types 'string' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(99,12): error TS2365: Operator '>=' cannot be applied to types 'string' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(100,12): error TS2365: Operator '>=' cannot be applied to types 'string' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(101,12): error TS2365: Operator '>=' cannot be applied to types 'string' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(103,12): error TS2365: Operator '>=' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(104,12): error TS2365: Operator '>=' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(105,12): error TS2365: Operator '>=' cannot be applied to types 'void' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(106,12): error TS2365: Operator '>=' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(109,12): error TS2365: Operator '>=' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(110,12): error TS2365: Operator '>=' cannot be applied to types 'E' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(111,12): error TS2365: Operator '>=' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(114,12): error TS2365: Operator '==' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(115,12): error TS2365: Operator '==' cannot be applied to types 'number' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(116,12): error TS2365: Operator '==' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(119,12): error TS2365: Operator '==' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(120,12): error TS2365: Operator '==' cannot be applied to types 'boolean' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(121,12): error TS2365: Operator '==' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(122,12): error TS2365: Operator '==' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(124,12): error TS2365: Operator '==' cannot be applied to types 'string' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(125,12): error TS2365: Operator '==' cannot be applied to types 'string' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(126,12): error TS2365: Operator '==' cannot be applied to types 'string' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(127,12): error TS2365: Operator '==' cannot be applied to types 'string' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(129,12): error TS2365: Operator '==' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(130,12): error TS2365: Operator '==' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(131,12): error TS2365: Operator '==' cannot be applied to types 'void' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(132,12): error TS2365: Operator '==' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(135,12): error TS2365: Operator '==' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(136,12): error TS2365: Operator '==' cannot be applied to types 'E' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(137,12): error TS2365: Operator '==' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(140,12): error TS2365: Operator '!=' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(141,12): error TS2365: Operator '!=' cannot be applied to types 'number' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(142,12): error TS2365: Operator '!=' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(145,12): error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(146,12): error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(147,12): error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(148,12): error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(150,12): error TS2365: Operator '!=' cannot be applied to types 'string' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(151,12): error TS2365: Operator '!=' cannot be applied to types 'string' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(152,12): error TS2365: Operator '!=' cannot be applied to types 'string' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(153,12): error TS2365: Operator '!=' cannot be applied to types 'string' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(155,12): error TS2365: Operator '!=' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(156,12): error TS2365: Operator '!=' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(157,12): error TS2365: Operator '!=' cannot be applied to types 'void' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(158,12): error TS2365: Operator '!=' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(161,12): error TS2365: Operator '!=' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(162,12): error TS2365: Operator '!=' cannot be applied to types 'E' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(163,12): error TS2365: Operator '!=' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(166,12): error TS2365: Operator '===' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(167,12): error TS2365: Operator '===' cannot be applied to types 'number' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(168,12): error TS2365: Operator '===' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(171,12): error TS2365: Operator '===' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(172,12): error TS2365: Operator '===' cannot be applied to types 'boolean' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(173,12): error TS2365: Operator '===' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(174,12): error TS2365: Operator '===' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(176,12): error TS2365: Operator '===' cannot be applied to types 'string' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(177,12): error TS2365: Operator '===' cannot be applied to types 'string' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(178,12): error TS2365: Operator '===' cannot be applied to types 'string' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(179,12): error TS2365: Operator '===' cannot be applied to types 'string' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(181,12): error TS2365: Operator '===' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(182,12): error TS2365: Operator '===' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(183,12): error TS2365: Operator '===' cannot be applied to types 'void' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(184,12): error TS2365: Operator '===' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(187,12): error TS2365: Operator '===' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(188,12): error TS2365: Operator '===' cannot be applied to types 'E' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(189,12): error TS2365: Operator '===' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(192,12): error TS2365: Operator '!==' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(193,12): error TS2365: Operator '!==' cannot be applied to types 'number' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(194,12): error TS2365: Operator '!==' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(197,12): error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(198,12): error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(199,12): error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(200,12): error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(202,12): error TS2365: Operator '!==' cannot be applied to types 'string' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(203,12): error TS2365: Operator '!==' cannot be applied to types 'string' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(204,12): error TS2365: Operator '!==' cannot be applied to types 'string' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(205,12): error TS2365: Operator '!==' cannot be applied to types 'string' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(207,12): error TS2365: Operator '!==' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(208,12): error TS2365: Operator '!==' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(209,12): error TS2365: Operator '!==' cannot be applied to types 'void' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(210,12): error TS2365: Operator '!==' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(213,12): error TS2365: Operator '!==' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(214,12): error TS2365: Operator '!==' cannot be applied to types 'E' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(215,12): error TS2365: Operator '!==' cannot be applied to types 'E' and 'void'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts (144 errors) ==== enum E { a, b, c } @@ -10,495 +156,495 @@ // operator < var r1a1 = a < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'boolean'. var r1a1 = a < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'string'. var r1a1 = a < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'void'. var r1a1 = a < e; // no error, expected var r1b1 = b < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'number'. var r1b1 = b < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'string'. var r1b1 = b < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'void'. var r1b1 = b < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'E'. var r1c1 = c < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'number'. var r1c1 = c < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'boolean'. var r1c1 = c < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'void'. var r1c1 = c < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'E'. var r1d1 = d < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'number'. var r1d1 = d < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'boolean'. var r1d1 = d < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'string'. var r1d1 = d < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'E'. var r1e1 = e < a; // no error, expected var r1e1 = e < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'boolean'. var r1e1 = e < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'string'. var r1e1 = e < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'void'. // operator > var r2a1 = a > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '>' cannot be applied to types 'number' and 'boolean'. var r2a1 = a > c; ~~~~~ -!!! Operator '>' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '>' cannot be applied to types 'number' and 'string'. var r2a1 = a > d; ~~~~~ -!!! Operator '>' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'number' and 'void'. var r2a1 = a > e; // no error, expected var r2b1 = b > a; ~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. var r2b1 = b > c; ~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'string'. var r2b1 = b > d; ~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'void'. var r2b1 = b > e; ~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'E'. var r2c1 = c > a; ~~~~~ -!!! Operator '>' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'string' and 'number'. var r2c1 = c > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '>' cannot be applied to types 'string' and 'boolean'. var r2c1 = c > d; ~~~~~ -!!! Operator '>' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'string' and 'void'. var r2c1 = c > e; ~~~~~ -!!! Operator '>' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '>' cannot be applied to types 'string' and 'E'. var r2d1 = d > a; ~~~~~ -!!! Operator '>' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'number'. var r2d1 = d > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'boolean'. var r2d1 = d > c; ~~~~~ -!!! Operator '>' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'string'. var r2d1 = d > e; ~~~~~ -!!! Operator '>' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'E'. var r2e1 = e > a; // no error, expected var r2e1 = e > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '>' cannot be applied to types 'E' and 'boolean'. var r2e1 = e > c; ~~~~~ -!!! Operator '>' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '>' cannot be applied to types 'E' and 'string'. var r2e1 = e > d; ~~~~~ -!!! Operator '>' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'E' and 'void'. // operator <= var r3a1 = a <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '<=' cannot be applied to types 'number' and 'boolean'. var r3a1 = a <= c; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'number' and 'string'. var r3a1 = a <= d; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '<=' cannot be applied to types 'number' and 'void'. var r3a1 = a <= e; // no error, expected var r3b1 = b <= a; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'number'. var r3b1 = b <= c; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'string'. var r3b1 = b <= d; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'void'. var r3b1 = b <= e; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'E'. var r3c1 = c <= a; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '<=' cannot be applied to types 'string' and 'number'. var r3c1 = c <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '<=' cannot be applied to types 'string' and 'boolean'. var r3c1 = c <= d; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '<=' cannot be applied to types 'string' and 'void'. var r3c1 = c <= e; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '<=' cannot be applied to types 'string' and 'E'. var r3d1 = d <= a; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'number'. var r3d1 = d <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'boolean'. var r3d1 = d <= c; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'string'. var r3d1 = d <= e; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'E'. var r3e1 = e <= a; // no error, expected var r3e1 = e <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '<=' cannot be applied to types 'E' and 'boolean'. var r3e1 = e <= c; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'E' and 'string'. var r3e1 = e <= d; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '<=' cannot be applied to types 'E' and 'void'. // operator >= var r4a1 = a >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '>=' cannot be applied to types 'number' and 'boolean'. var r4a1 = a >= c; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'number' and 'string'. var r4a1 = a >= d; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '>=' cannot be applied to types 'number' and 'void'. var r4a1 = a >= e; // no error, expected var r4b1 = b >= a; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'number'. var r4b1 = b >= c; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'string'. var r4b1 = b >= d; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'void'. var r4b1 = b >= e; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'E'. var r4c1 = c >= a; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '>=' cannot be applied to types 'string' and 'number'. var r4c1 = c >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '>=' cannot be applied to types 'string' and 'boolean'. var r4c1 = c >= d; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '>=' cannot be applied to types 'string' and 'void'. var r4c1 = c >= e; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '>=' cannot be applied to types 'string' and 'E'. var r4d1 = d >= a; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'number'. var r4d1 = d >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'boolean'. var r4d1 = d >= c; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'string'. var r4d1 = d >= e; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'E'. var r4e1 = e >= a; // no error, expected var r4e1 = e >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '>=' cannot be applied to types 'E' and 'boolean'. var r4e1 = e >= c; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'E' and 'string'. var r4e1 = e >= d; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '>=' cannot be applied to types 'E' and 'void'. // operator == var r5a1 = a == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'boolean'. var r5a1 = a == c; ~~~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'string'. var r5a1 = a == d; ~~~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'void'. var r5a1 = a == e; // no error, expected var r5b1 = b == a; ~~~~~~ -!!! Operator '==' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '==' cannot be applied to types 'boolean' and 'number'. var r5b1 = b == c; ~~~~~~ -!!! Operator '==' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'boolean' and 'string'. var r5b1 = b == d; ~~~~~~ -!!! Operator '==' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '==' cannot be applied to types 'boolean' and 'void'. var r5b1 = b == e; ~~~~~~ -!!! Operator '==' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '==' cannot be applied to types 'boolean' and 'E'. var r5c1 = c == a; ~~~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'number'. var r5c1 = c == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'boolean'. var r5c1 = c == d; ~~~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'void'. var r5c1 = c == e; ~~~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'E'. var r5d1 = d == a; ~~~~~~ -!!! Operator '==' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '==' cannot be applied to types 'void' and 'number'. var r5d1 = d == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'void' and 'boolean'. var r5d1 = d == c; ~~~~~~ -!!! Operator '==' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'void' and 'string'. var r5d1 = d == e; ~~~~~~ -!!! Operator '==' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '==' cannot be applied to types 'void' and 'E'. var r5e1 = e == a; // no error, expected var r5e1 = e == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'boolean'. var r5e1 = e == c; ~~~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'string'. var r5e1 = e == d; ~~~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'void'. // operator != var r6a1 = a != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '!=' cannot be applied to types 'number' and 'boolean'. var r6a1 = a != c; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'number' and 'string'. var r6a1 = a != d; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '!=' cannot be applied to types 'number' and 'void'. var r6a1 = a != e; // no error, expected var r6b1 = b != a; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'number'. var r6b1 = b != c; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'string'. var r6b1 = b != d; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'void'. var r6b1 = b != e; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'E'. var r6c1 = c != a; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '!=' cannot be applied to types 'string' and 'number'. var r6c1 = c != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '!=' cannot be applied to types 'string' and 'boolean'. var r6c1 = c != d; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '!=' cannot be applied to types 'string' and 'void'. var r6c1 = c != e; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '!=' cannot be applied to types 'string' and 'E'. var r6d1 = d != a; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '!=' cannot be applied to types 'void' and 'number'. var r6d1 = d != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '!=' cannot be applied to types 'void' and 'boolean'. var r6d1 = d != c; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'void' and 'string'. var r6d1 = d != e; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '!=' cannot be applied to types 'void' and 'E'. var r6e1 = e != a; // no error, expected var r6e1 = e != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '!=' cannot be applied to types 'E' and 'boolean'. var r6e1 = e != c; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'E' and 'string'. var r6e1 = e != d; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '!=' cannot be applied to types 'E' and 'void'. // operator === var r7a1 = a === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '===' cannot be applied to types 'number' and 'boolean'. var r7a1 = a === c; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '===' cannot be applied to types 'number' and 'string'. var r7a1 = a === d; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '===' cannot be applied to types 'number' and 'void'. var r7a1 = a === e; // no error, expected var r7b1 = b === a; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '===' cannot be applied to types 'boolean' and 'number'. var r7b1 = b === c; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '===' cannot be applied to types 'boolean' and 'string'. var r7b1 = b === d; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '===' cannot be applied to types 'boolean' and 'void'. var r7b1 = b === e; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '===' cannot be applied to types 'boolean' and 'E'. var r7c1 = c === a; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'number'. var r7c1 = c === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'boolean'. var r7c1 = c === d; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'void'. var r7c1 = c === e; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'E'. var r7d1 = d === a; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '===' cannot be applied to types 'void' and 'number'. var r7d1 = d === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '===' cannot be applied to types 'void' and 'boolean'. var r7d1 = d === c; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '===' cannot be applied to types 'void' and 'string'. var r7d1 = d === e; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '===' cannot be applied to types 'void' and 'E'. var r7e1 = e === a; // no error, expected var r7e1 = e === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '===' cannot be applied to types 'E' and 'boolean'. var r7e1 = e === c; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '===' cannot be applied to types 'E' and 'string'. var r7e1 = e === d; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '===' cannot be applied to types 'E' and 'void'. // operator !== var r8a1 = a !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '!==' cannot be applied to types 'number' and 'boolean'. var r8a1 = a !== c; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'number' and 'string'. var r8a1 = a !== d; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '!==' cannot be applied to types 'number' and 'void'. var r8a1 = a !== e; // no error, expected var r8b1 = b !== a; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'number'. var r8b1 = b !== c; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'string'. var r8b1 = b !== d; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'void'. var r8b1 = b !== e; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'E'. var r8c1 = c !== a; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '!==' cannot be applied to types 'string' and 'number'. var r8c1 = c !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '!==' cannot be applied to types 'string' and 'boolean'. var r8c1 = c !== d; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '!==' cannot be applied to types 'string' and 'void'. var r8c1 = c !== e; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '!==' cannot be applied to types 'string' and 'E'. var r8d1 = d !== a; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '!==' cannot be applied to types 'void' and 'number'. var r8d1 = d !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '!==' cannot be applied to types 'void' and 'boolean'. var r8d1 = d !== c; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'void' and 'string'. var r8d1 = d !== e; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '!==' cannot be applied to types 'void' and 'E'. var r8e1 = e !== a; // no error, expected var r8e1 = e !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '!==' cannot be applied to types 'E' and 'boolean'. var r8e1 = e !== c; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'E' and 'string'. var r8e1 = e !== d; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'E' and 'void'. \ No newline at end of file +!!! error TS2365: Operator '!==' cannot be applied to types 'E' and 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt index 6114521d63c..6bd8c30b205 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt @@ -1,3 +1,125 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(12,14): error TS2365: Operator '<' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(13,14): error TS2365: Operator '>' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(14,14): error TS2365: Operator '<=' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(15,14): error TS2365: Operator '>=' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(16,14): error TS2365: Operator '==' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(17,14): error TS2365: Operator '!=' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(18,14): error TS2365: Operator '===' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(19,14): error TS2365: Operator '!==' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(22,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(23,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(24,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(25,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(26,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(27,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(28,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(30,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(31,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(32,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(33,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(34,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(35,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(36,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(39,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(40,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(41,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(42,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(43,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(44,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(45,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(47,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(48,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(49,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(50,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(51,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(52,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(53,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(56,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(57,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(58,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(59,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(60,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(61,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(62,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(64,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(65,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(66,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(67,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(68,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(69,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(70,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(73,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(74,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(75,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(76,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(77,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(78,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(79,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(81,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(82,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(83,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(84,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(85,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(86,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(87,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(90,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(91,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(92,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(93,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(94,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(95,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(96,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(98,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(99,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(100,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(101,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(102,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(103,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(104,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(107,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(108,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(109,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(110,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(111,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(112,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(113,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(115,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(116,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(117,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(118,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(119,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(120,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(121,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(124,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(125,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(126,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(127,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(128,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(129,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(130,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(132,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(133,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(134,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(135,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(136,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(137,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(138,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(141,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(142,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(143,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(144,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(145,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(146,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(147,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(149,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(150,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(151,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(152,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(153,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(154,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(155,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts (120 errors) ==== enum E { a, b, c } @@ -12,386 +134,386 @@ function foo(t: T, u: U) { var r1 = t < u; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'U'. var r2 = t > u; ~~~~~ -!!! Operator '>' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '>' cannot be applied to types 'T' and 'U'. var r3 = t <= u; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and 'U'. var r4 = t >= u; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'U'. var r5 = t == u; ~~~~~~ -!!! Operator '==' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '==' cannot be applied to types 'T' and 'U'. var r6 = t != u; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '!=' cannot be applied to types 'T' and 'U'. var r7 = t === u; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '===' cannot be applied to types 'T' and 'U'. var r8 = t !== u; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '!==' cannot be applied to types 'T' and 'U'. // operator < var r1a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r1a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r1a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r1a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r1a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r1a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r1a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r1b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r1b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r1b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r1b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r1b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r1b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r1b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator > var r2a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r2a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r2a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r2a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r2a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r2a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r2a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r2b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r2b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r2b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r2b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r2b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r2b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r2b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator <= var r3a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r3a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r3a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r3a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r3a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r3a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r3a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r3b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r3b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r3b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r3b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r3b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r3b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r3b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator >= var r4a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r4a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r4a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r4a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r4a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r4a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r4a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r4b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r4b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r4b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r4b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r4b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r4b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r4b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator == var r5a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r5a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r5a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r5a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r5a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r5a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r5a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r5b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r5b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r5b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r5b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r5b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r5b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r5b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator != var r6a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r6a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r6a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r6a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r6a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r6a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r6a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r6b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r6b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r6b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r6b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r6b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r6b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r6b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator === var r7a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r7a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r7a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r7a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r7a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r7a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r7a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r7b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r7b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r7b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r7b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r7b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r7b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r7b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator !== var r8a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r8a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r8a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r8a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r8a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r8a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r8a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r8b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r8b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r8b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r8b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r8b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r8b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r8b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt index 33fcc439e0a..2e63bf0a795 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt @@ -1,3 +1,21 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(49,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(66,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(83,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(91,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(100,12): error TS2365: Operator '==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(108,12): error TS2365: Operator '==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(117,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(125,12): error TS2365: Operator '!=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(134,12): error TS2365: Operator '===' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(142,12): error TS2365: Operator '===' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(151,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(159,12): error TS2365: Operator '!==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts (16 errors) ==== class Base { public a: string; @@ -32,7 +50,7 @@ var r1a1 = a1 < b1; var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r1a3 = a3 < b3; var r1a4 = a4 < b4; var r1a5 = a5 < b5; @@ -42,7 +60,7 @@ var r1b1 = b1 < a1; var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r1b3 = b3 < a3; var r1b4 = b4 < a4; var r1b5 = b5 < a5; @@ -53,7 +71,7 @@ var r2a1 = a1 > b1; var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r2a3 = a3 > b3; var r2a4 = a4 > b4; var r2a5 = a5 > b5; @@ -63,7 +81,7 @@ var r2b1 = b1 > a1; var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r2b3 = b3 > a3; var r2b4 = b4 > a4; var r2b5 = b5 > a5; @@ -74,7 +92,7 @@ var r3a1 = a1 <= b1; var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r3a3 = a3 <= b3; var r3a4 = a4 <= b4; var r3a5 = a5 <= b5; @@ -84,7 +102,7 @@ var r3b1 = b1 <= a1; var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r3b3 = b3 <= a3; var r3b4 = b4 <= a4; var r3b5 = b5 <= a5; @@ -95,7 +113,7 @@ var r4a1 = a1 >= b1; var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r4a3 = a3 >= b3; var r4a4 = a4 >= b4; var r4a5 = a5 >= b5; @@ -105,7 +123,7 @@ var r4b1 = b1 >= a1; var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r4b3 = b3 >= a3; var r4b4 = b4 >= a4; var r4b5 = b5 >= a5; @@ -116,7 +134,7 @@ var r5a1 = a1 == b1; var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r5a3 = a3 == b3; var r5a4 = a4 == b4; var r5a5 = a5 == b5; @@ -126,7 +144,7 @@ var r5b1 = b1 == a1; var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r5b3 = b3 == a3; var r5b4 = b4 == a4; var r5b5 = b5 == a5; @@ -137,7 +155,7 @@ var r6a1 = a1 != b1; var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r6a3 = a3 != b3; var r6a4 = a4 != b4; var r6a5 = a5 != b5; @@ -147,7 +165,7 @@ var r6b1 = b1 != a1; var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r6b3 = b3 != a3; var r6b4 = b4 != a4; var r6b5 = b5 != a5; @@ -158,7 +176,7 @@ var r7a1 = a1 === b1; var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r7a3 = a3 === b3; var r7a4 = a4 === b4; var r7a5 = a5 === b5; @@ -168,7 +186,7 @@ var r7b1 = b1 === a1; var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r7b3 = b3 === a3; var r7b4 = b4 === a4; var r7b5 = b5 === a5; @@ -179,7 +197,7 @@ var r8a1 = a1 !== b1; var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r8a3 = a3 !== b3; var r8a4 = a4 !== b4; var r8a5 = a5 !== b5; @@ -189,7 +207,7 @@ var r8b1 = b1 !== a1; var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r8b3 = b3 !== a3; var r8b4 = b4 !== a4; var r8b5 = b5 !== a5; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt index 573322f8d66..0e352ebcc9d 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt @@ -1,3 +1,21 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(49,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(66,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(83,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(91,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(100,12): error TS2365: Operator '==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(108,12): error TS2365: Operator '==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(117,12): error TS2365: Operator '!=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(125,12): error TS2365: Operator '!=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(134,12): error TS2365: Operator '===' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(142,12): error TS2365: Operator '===' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(151,12): error TS2365: Operator '!==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(159,12): error TS2365: Operator '!==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts (16 errors) ==== class Base { public a: string; @@ -32,7 +50,7 @@ var r1a1 = a1 < b1; var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r1a3 = a3 < b3; var r1a4 = a4 < b4; var r1a5 = a5 < b5; @@ -42,7 +60,7 @@ var r1b1 = b1 < a1; var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r1b3 = b3 < a3; var r1b4 = b4 < a4; var r1b5 = b5 < a5; @@ -53,7 +71,7 @@ var r2a1 = a1 > b1; var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r2a3 = a3 > b3; var r2a4 = a4 > b4; var r2a5 = a5 > b5; @@ -63,7 +81,7 @@ var r2b1 = b1 > a1; var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r2b3 = b3 > a3; var r2b4 = b4 > a4; var r2b5 = b5 > a5; @@ -74,7 +92,7 @@ var r3a1 = a1 <= b1; var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r3a3 = a3 <= b3; var r3a4 = a4 <= b4; var r3a5 = a5 <= b5; @@ -84,7 +102,7 @@ var r3b1 = b1 <= a1; var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r3b3 = b3 <= a3; var r3b4 = b4 <= a4; var r3b5 = b5 <= a5; @@ -95,7 +113,7 @@ var r4a1 = a1 >= b1; var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r4a3 = a3 >= b3; var r4a4 = a4 >= b4; var r4a5 = a5 >= b5; @@ -105,7 +123,7 @@ var r4b1 = b1 >= a1; var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r4b3 = b3 >= a3; var r4b4 = b4 >= a4; var r4b5 = b5 >= a5; @@ -116,7 +134,7 @@ var r5a1 = a1 == b1; var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r5a3 = a3 == b3; var r5a4 = a4 == b4; var r5a5 = a5 == b5; @@ -126,7 +144,7 @@ var r5b1 = b1 == a1; var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r5b3 = b3 == a3; var r5b4 = b4 == a4; var r5b5 = b5 == a5; @@ -137,7 +155,7 @@ var r6a1 = a1 != b1; var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r6a3 = a3 != b3; var r6a4 = a4 != b4; var r6a5 = a5 != b5; @@ -147,7 +165,7 @@ var r6b1 = b1 != a1; var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r6b3 = b3 != a3; var r6b4 = b4 != a4; var r6b5 = b5 != a5; @@ -158,7 +176,7 @@ var r7a1 = a1 === b1; var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r7a3 = a3 === b3; var r7a4 = a4 === b4; var r7a5 = a5 === b5; @@ -168,7 +186,7 @@ var r7b1 = b1 === a1; var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r7b3 = b3 === a3; var r7b4 = b4 === a4; var r7b5 = b5 === a5; @@ -179,7 +197,7 @@ var r8a1 = a1 !== b1; var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r8a3 = a3 !== b3; var r8a4 = a4 !== b4; var r8a5 = a5 !== b5; @@ -189,7 +207,7 @@ var r8b1 = b1 !== a1; var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r8b3 = b3 !== a3; var r8b4 = b4 !== a4; var r8b5 = b5 !== a5; diff --git a/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt index 139efbbfc99..e8193e91a0f 100644 --- a/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt @@ -1,3 +1,37 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(6,15): error TS2365: Operator '<' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(7,15): error TS2365: Operator '>' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(8,15): error TS2365: Operator '<=' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(9,15): error TS2365: Operator '>=' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(10,15): error TS2365: Operator '==' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(11,15): error TS2365: Operator '!=' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(12,15): error TS2365: Operator '===' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(13,15): error TS2365: Operator '!==' cannot be applied to types 'T' and 'U'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(15,15): error TS2365: Operator '<' cannot be applied to types 'U' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(16,15): error TS2365: Operator '>' cannot be applied to types 'U' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(17,15): error TS2365: Operator '<=' cannot be applied to types 'U' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(18,15): error TS2365: Operator '>=' cannot be applied to types 'U' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(19,15): error TS2365: Operator '==' cannot be applied to types 'U' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(20,15): error TS2365: Operator '!=' cannot be applied to types 'U' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(21,15): error TS2365: Operator '===' cannot be applied to types 'U' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(22,15): error TS2365: Operator '!==' cannot be applied to types 'U' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(24,15): error TS2365: Operator '<' cannot be applied to types 'T' and 'V'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(25,15): error TS2365: Operator '>' cannot be applied to types 'T' and 'V'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(26,15): error TS2365: Operator '<=' cannot be applied to types 'T' and 'V'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(27,15): error TS2365: Operator '>=' cannot be applied to types 'T' and 'V'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(28,15): error TS2365: Operator '==' cannot be applied to types 'T' and 'V'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(29,15): error TS2365: Operator '!=' cannot be applied to types 'T' and 'V'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(30,15): error TS2365: Operator '===' cannot be applied to types 'T' and 'V'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(31,15): error TS2365: Operator '!==' cannot be applied to types 'T' and 'V'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(33,15): error TS2365: Operator '<' cannot be applied to types 'V' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(34,15): error TS2365: Operator '>' cannot be applied to types 'V' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(35,15): error TS2365: Operator '<=' cannot be applied to types 'V' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(36,15): error TS2365: Operator '>=' cannot be applied to types 'V' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(37,15): error TS2365: Operator '==' cannot be applied to types 'V' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(38,15): error TS2365: Operator '!=' cannot be applied to types 'V' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(39,15): error TS2365: Operator '===' cannot be applied to types 'V' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(40,15): error TS2365: Operator '!==' cannot be applied to types 'V' and 'T'. + + ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts (32 errors) ==== var a: {}; var b: Object; @@ -6,103 +40,103 @@ // errors var ra1 = t < u; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'U'. var ra2 = t > u; ~~~~~ -!!! Operator '>' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '>' cannot be applied to types 'T' and 'U'. var ra3 = t <= u; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and 'U'. var ra4 = t >= u; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'U'. var ra5 = t == u; ~~~~~~ -!!! Operator '==' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '==' cannot be applied to types 'T' and 'U'. var ra6 = t != u; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '!=' cannot be applied to types 'T' and 'U'. var ra7 = t === u; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '===' cannot be applied to types 'T' and 'U'. var ra8 = t !== u; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '!==' cannot be applied to types 'T' and 'U'. var rb1 = u < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'U' and 'T'. var rb2 = u > t; ~~~~~ -!!! Operator '>' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '>' cannot be applied to types 'U' and 'T'. var rb3 = u <= t; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '<=' cannot be applied to types 'U' and 'T'. var rb4 = u >= t; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '>=' cannot be applied to types 'U' and 'T'. var rb5 = u == t; ~~~~~~ -!!! Operator '==' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '==' cannot be applied to types 'U' and 'T'. var rb6 = u != t; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '!=' cannot be applied to types 'U' and 'T'. var rb7 = u === t; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '===' cannot be applied to types 'U' and 'T'. var rb8 = u !== t; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '!==' cannot be applied to types 'U' and 'T'. var rc1 = t < v; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'V'. var rc2 = t > v; ~~~~~ -!!! Operator '>' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '>' cannot be applied to types 'T' and 'V'. var rc3 = t <= v; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and 'V'. var rc4 = t >= v; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'V'. var rc5 = t == v; ~~~~~~ -!!! Operator '==' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '==' cannot be applied to types 'T' and 'V'. var rc6 = t != v; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '!=' cannot be applied to types 'T' and 'V'. var rc7 = t === v; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '===' cannot be applied to types 'T' and 'V'. var rc8 = t !== v; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '!==' cannot be applied to types 'T' and 'V'. var rd1 = v < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'V' and 'T'. var rd2 = v > t; ~~~~~ -!!! Operator '>' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '>' cannot be applied to types 'V' and 'T'. var rd3 = v <= t; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '<=' cannot be applied to types 'V' and 'T'. var rd4 = v >= t; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '>=' cannot be applied to types 'V' and 'T'. var rd5 = v == t; ~~~~~~ -!!! Operator '==' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '==' cannot be applied to types 'V' and 'T'. var rd6 = v != t; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '!=' cannot be applied to types 'V' and 'T'. var rd7 = v === t; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '===' cannot be applied to types 'V' and 'T'. var rd8 = v !== t; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '!==' cannot be applied to types 'V' and 'T'. // ok var re1 = t < a; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt index 3aa94844f14..204a7d4c21a 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(1,7): error TS2310: Type 'S18' recursively references itself as a base type. +tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(4,2): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts (2 errors) ==== class S18 extends S18 ~~~ -!!! Type 'S18' recursively references itself as a base type. +!!! error TS2310: Type 'S18' recursively references itself as a base type. { } (new S18(123)).S18 = 0; ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/complicatedPrivacy.errors.txt b/tests/baselines/reference/complicatedPrivacy.errors.txt index 443fefd9487..e4867f0d2f5 100644 --- a/tests/baselines/reference/complicatedPrivacy.errors.txt +++ b/tests/baselines/reference/complicatedPrivacy.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. +tests/cases/compiler/complicatedPrivacy.ts(24,38): error TS1005: ';' expected. +tests/cases/compiler/complicatedPrivacy.ts(35,6): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/complicatedPrivacy.ts(73,49): error TS2305: Module 'mglo5' has no exported member 'i6'. + + ==== tests/cases/compiler/complicatedPrivacy.ts (4 errors) ==== module m1 { export module m2 { @@ -11,7 +17,7 @@ export class C2 implements m3.i3 { public get p1(arg) { ~~ -!!! A 'get' accessor cannot have parameters. +!!! error TS1054: A 'get' accessor cannot have parameters. return new C1(); } @@ -26,7 +32,7 @@ export function f2(arg1: { x?: C1, y: number }) { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. } export function f3(): { @@ -39,7 +45,7 @@ { [number]: C1; ~~~~~~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. }) { } @@ -79,7 +85,7 @@ export class c_pr implements mglo5.i5, mglo5.i6 { ~~~~~~~~ -!!! Module 'mglo5' has no exported member 'i6'. +!!! error TS2305: Module 'mglo5' has no exported member 'i6'. f1() { return "Hello"; } diff --git a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt index 6313e08471c..2055bbc2b34 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt +++ b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(5,1): error TS2323: Type 'string' is not assignable to type 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(8,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(11,1): error TS2323: Type 'string' is not assignable to type 'E'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2322: Type 'string' is not assignable to type '{ a: string; }': + Property 'a' is missing in type 'String'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(17,1): error TS2323: Type 'string' is not assignable to type 'void'. + + ==== tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts (5 errors) ==== // string can add every type, and result string cannot be assigned to below types enum E { a, b, c } @@ -5,25 +13,25 @@ var x1: boolean; x1 += ''; ~~ -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2323: Type 'string' is not assignable to type 'boolean'. var x2: number; x2 += ''; ~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. var x3: E; x3 += ''; ~~ -!!! Type 'string' is not assignable to type 'E'. +!!! error TS2323: Type 'string' is not assignable to type 'E'. var x4: {a: string}; x4 += ''; ~~ -!!! Type 'string' is not assignable to type '{ a: string; }': -!!! Property 'a' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type '{ a: string; }': +!!! error TS2322: Property 'a' is missing in type 'String'. var x5: void; x5 += ''; ~~ -!!! Type 'string' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/compoundAdditionAssignmentWithInvalidOperands.errors.txt b/tests/baselines/reference/compoundAdditionAssignmentWithInvalidOperands.errors.txt index d7a4cca8e99..45be0c3129f 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/compoundAdditionAssignmentWithInvalidOperands.errors.txt @@ -1,3 +1,32 @@ +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(6,1): error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'void'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(7,1): error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(8,1): error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'number'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(9,1): error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'E'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(10,1): error TS2365: Operator '+=' cannot be applied to types 'boolean' and '{}'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(11,1): error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(12,1): error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(15,1): error TS2365: Operator '+=' cannot be applied to types '{}' and 'void'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(16,1): error TS2365: Operator '+=' cannot be applied to types '{}' and 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(17,1): error TS2365: Operator '+=' cannot be applied to types '{}' and 'number'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(18,1): error TS2365: Operator '+=' cannot be applied to types '{}' and 'E'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(19,1): error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(20,1): error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(21,1): error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(24,1): error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(25,1): error TS2365: Operator '+=' cannot be applied to types 'void' and 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(26,1): error TS2365: Operator '+=' cannot be applied to types 'void' and 'number'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(27,1): error TS2365: Operator '+=' cannot be applied to types 'void' and 'E'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(28,1): error TS2365: Operator '+=' cannot be applied to types 'void' and '{}'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(29,1): error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(30,1): error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(33,1): error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(34,1): error TS2365: Operator '+=' cannot be applied to types 'number' and 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(35,1): error TS2365: Operator '+=' cannot be applied to types 'number' and '{}'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(38,1): error TS2365: Operator '+=' cannot be applied to types 'E' and 'void'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(39,1): error TS2365: Operator '+=' cannot be applied to types 'E' and 'boolean'. +tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts(40,1): error TS2365: Operator '+=' cannot be applied to types 'E' and '{}'. + + ==== tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts (27 errors) ==== enum E { a, b } @@ -6,90 +35,90 @@ var x1: boolean; x1 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'void'. x1 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. x1 += 0; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'number'. x1 += E.a; ~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'E'. x1 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and '{}'. x1 += null; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. x1 += undefined; ~~~~~~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. var x2: {}; x2 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and 'void'. x2 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and 'boolean'. x2 += 0; ~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and 'number'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and 'number'. x2 += E.a; ~~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and 'E'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and 'E'. x2 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. x2 += null; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. x2 += undefined; ~~~~~~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. var x3: void; x3 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. x3 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'boolean'. x3 += 0; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'number'. x3 += E.a; ~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'E'. x3 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and '{}'. x3 += null; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. x3 += undefined; ~~~~~~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. var x4: number; x4 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. x4 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'number' and 'boolean'. x4 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'number' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types 'number' and '{}'. var x5: E; x5 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'E' and 'void'. x5 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'E' and 'boolean'. x5 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'E' and '{}'. \ No newline at end of file +!!! error TS2365: Operator '+=' cannot be applied to types 'E' and '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt b/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt index d0045d92aa0..9367285ef93 100644 --- a/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt @@ -1,3 +1,73 @@ +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(7,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/compoundArithmeticAssignmentWithInvalidOperands.ts(8,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/compoundArithmeticAssignmentWithInvalidOperands.ts(8,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(9,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/compoundArithmeticAssignmentWithInvalidOperands.ts(9,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(10,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/compoundArithmeticAssignmentWithInvalidOperands.ts(11,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/compoundArithmeticAssignmentWithInvalidOperands.ts(11,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(12,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/compoundArithmeticAssignmentWithInvalidOperands.ts(13,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/compoundArithmeticAssignmentWithInvalidOperands.ts(13,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(14,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/compoundArithmeticAssignmentWithInvalidOperands.ts(14,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(15,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/compoundArithmeticAssignmentWithInvalidOperands.ts(15,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(18,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/compoundArithmeticAssignmentWithInvalidOperands.ts(19,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/compoundArithmeticAssignmentWithInvalidOperands.ts(19,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(20,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/compoundArithmeticAssignmentWithInvalidOperands.ts(20,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(21,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/compoundArithmeticAssignmentWithInvalidOperands.ts(22,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/compoundArithmeticAssignmentWithInvalidOperands.ts(22,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(23,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/compoundArithmeticAssignmentWithInvalidOperands.ts(24,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/compoundArithmeticAssignmentWithInvalidOperands.ts(24,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(25,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/compoundArithmeticAssignmentWithInvalidOperands.ts(25,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(26,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/compoundArithmeticAssignmentWithInvalidOperands.ts(26,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(29,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/compoundArithmeticAssignmentWithInvalidOperands.ts(30,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/compoundArithmeticAssignmentWithInvalidOperands.ts(30,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(31,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/compoundArithmeticAssignmentWithInvalidOperands.ts(31,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(32,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/compoundArithmeticAssignmentWithInvalidOperands.ts(33,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/compoundArithmeticAssignmentWithInvalidOperands.ts(33,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(34,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/compoundArithmeticAssignmentWithInvalidOperands.ts(35,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/compoundArithmeticAssignmentWithInvalidOperands.ts(35,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(36,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/compoundArithmeticAssignmentWithInvalidOperands.ts(36,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(37,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/compoundArithmeticAssignmentWithInvalidOperands.ts(37,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(40,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/compoundArithmeticAssignmentWithInvalidOperands.ts(41,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/compoundArithmeticAssignmentWithInvalidOperands.ts(41,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(42,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/compoundArithmeticAssignmentWithInvalidOperands.ts(42,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(43,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/compoundArithmeticAssignmentWithInvalidOperands.ts(44,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/compoundArithmeticAssignmentWithInvalidOperands.ts(44,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(45,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/compoundArithmeticAssignmentWithInvalidOperands.ts(46,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/compoundArithmeticAssignmentWithInvalidOperands.ts(46,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(47,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/compoundArithmeticAssignmentWithInvalidOperands.ts(47,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(48,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/compoundArithmeticAssignmentWithInvalidOperands.ts(48,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(51,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(52,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(53,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(54,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(57,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(58,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(59,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(60,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts (68 errors) ==== enum E { a, b } @@ -7,191 +77,191 @@ var x1: boolean; x1 *= a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= b; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= true; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= 0; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= '' ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= E.a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= {}; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x2: string; x2 *= a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= b; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= true; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= 0; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= '' ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= E.a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= {}; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x3: {}; x3 *= a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= b; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= true; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= 0; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= '' ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= E.a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= {}; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x4: void; x4 *= a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= b; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= true; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= 0; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= '' ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= E.a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= {}; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x5: number; x5 *= b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x5 *= true; ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x5 *= '' ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x5 *= {}; ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x6: E; x6 *= b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x6 *= true; ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x6 *= '' ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x6 *= {}; ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt index 7fe036ef084..b850d0a0d38 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt @@ -1,3 +1,85 @@ +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(69,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(70,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(74,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(75,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(79,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(80,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(85,21): error TS1128: Declaration or statement expected. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(86,21): error TS1128: Declaration or statement expected. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(87,11): error TS1005: ';' expected. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(88,11): error TS1005: ';' expected. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(7,9): 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(8,9): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(11,9): 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(12,9): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(15,9): 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(16,9): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(21,5): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(22,5): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(25,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(26,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(30,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(31,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(33,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(34,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(37,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(38,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(40,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(41,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(44,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(45,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(46,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(47,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(48,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(49,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(50,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(51,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(52,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(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(62,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(63,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(69,9): 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(70,9): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(74,9): 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(75,9): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(79,9): 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(80,9): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(91,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(92,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(95,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(96,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(97,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(98,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(99,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(100,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(101,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(102,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(103,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(104,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(105,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(106,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(107,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(108,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(109,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(110,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(111,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(112,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(113,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(114,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(115,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(116,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(117,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(118,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(119,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(120,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(121,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(122,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts (80 errors) ==== // expected error for all the LHS of compound assignments (arithmetic and addition) var value; @@ -7,129 +89,129 @@ constructor() { this *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } foo() { this *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } static sfoo() { this *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } } function foo() { this *= value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } this *= value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // identifiers: module, class, enum, function module M { export var a; } M *= value; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. M += value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. C *= value; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. C += value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. enum E { } E *= value; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. E += value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. foo *= value; ~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. foo += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // literals null *= value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. null += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. true *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. true += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. false *= value; ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. false += value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. 0 *= value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. 0 += value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. '' *= value; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. '' += value; ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. /d+/ *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. /d+/ += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // object literals { a: 0} *= value; ~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. { a: 0} += value; ~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. // array literals ['', ''] *= value; ~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ['', ''] += value; ~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // super class Derived extends C { @@ -137,147 +219,147 @@ super(); super *= value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. super += value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } foo() { super *= value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. super += value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } static sfoo() { super *= value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. super += value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } } // function expression function bar1() { } *= value; ~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. function bar2() { } += value; ~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. () => { } *= value; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. () => { } += value; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. // function calls foo() *= value; ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. foo() += value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // parentheses, the containted expression is value (this) *= value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (this) += value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (M) *= value; ~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (M) += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (C) *= value; ~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (C) += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (E) *= value; ~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (E) += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (foo) *= value; ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (foo) += value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (null) *= value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (null) += value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (true) *= value; ~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (true) += value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (0) *= value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (0) += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ('') *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ('') += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (/d+/) *= value; ~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (/d+/) += value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ({}) *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ({}) += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ([]) *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ([]) += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (function baz1() { }) *= value; ~~~~~~~~~~~~~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (function baz2() { }) += value; ~~~~~~~~~~~~~~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (foo()) *= value; ~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (foo()) += value; ~~~~~~~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/concatClassAndString.errors.txt b/tests/baselines/reference/concatClassAndString.errors.txt index e97ff01d754..623c213181f 100644 --- a/tests/baselines/reference/concatClassAndString.errors.txt +++ b/tests/baselines/reference/concatClassAndString.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/concatClassAndString.ts(4,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/compiler/concatClassAndString.ts (1 errors) ==== // Shouldn't compile (the long form f = f + ""; doesn't): class f { } f += ''; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpression1.errors.txt b/tests/baselines/reference/conditionalExpression1.errors.txt index 0ae4814113d..542b660ba42 100644 --- a/tests/baselines/reference/conditionalExpression1.errors.txt +++ b/tests/baselines/reference/conditionalExpression1.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2323: Type '{}' is not assignable to type 'boolean'. +tests/cases/compiler/conditionalExpression1.ts(1,19): error TS2367: No best common type exists between 'number' and 'string'. + + ==== tests/cases/compiler/conditionalExpression1.ts (2 errors) ==== var x: boolean = (true ? 1 : ""); // should be an error ~ -!!! Type '{}' is not assignable to type 'boolean'. +!!! error TS2323: Type '{}' is not assignable to type 'boolean'. ~~~~~~~~~~~~~ -!!! No best common type exists between 'number' and 'string'. \ No newline at end of file +!!! error TS2367: No best common type exists between 'number' and 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt index 4a34e042b1e..7db921cbe1a 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(12,1): error TS2367: No best common type exists between 'A' and 'B'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(13,15): error TS2367: No best common type exists between 'A' and 'B'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,5): error TS2322: Type '{}' is not assignable to type 'A': + Property 'propertyA' is missing in type '{}'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,18): error TS2366: No best common type exists between 'A', 'A', and 'B'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(17,5): error TS2322: Type '{}' is not assignable to type 'B': + Property 'propertyB' is missing in type '{}'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(17,18): error TS2366: No best common type exists between 'B', 'A', and 'B'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,5): error TS2323: Type '{}' is not assignable to type '(t: X) => number'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,33): error TS2366: No best common type exists between '(t: X) => number', '(m: X) => number', and '(n: X) => string'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,5): error TS2323: Type '{}' is not assignable to type '(t: X) => string'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,33): error TS2366: No best common type exists between '(t: X) => string', '(m: X) => number', and '(n: X) => string'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(21,5): error TS2323: Type '{}' is not assignable to type '(t: X) => boolean'. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(21,34): error TS2366: No best common type exists between '(t: X) => boolean', '(m: X) => number', and '(n: X) => string'. + + ==== tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts (12 errors) ==== //Cond ? Expr1 : Expr2, Expr1 and Expr2 have no identical best common type class X { propertyX: any; propertyX1: number; propertyX2: string }; @@ -12,37 +28,37 @@ //Be not contextually typed true ? a : b; ~~~~~~~~~~~~ -!!! No best common type exists between 'A' and 'B'. +!!! error TS2367: No best common type exists between 'A' and 'B'. var result1 = true ? a : b; ~~~~~~~~~~~~ -!!! No best common type exists between 'A' and 'B'. +!!! error TS2367: No best common type exists between 'A' and 'B'. //Be contextually typed and and bct is not identical var result2: A = true ? a : b; ~~~~~~~ -!!! Type '{}' is not assignable to type 'A': -!!! Property 'propertyA' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'A': +!!! error TS2322: Property 'propertyA' is missing in type '{}'. ~~~~~~~~~~~~ -!!! No best common type exists between 'A', 'A', and 'B'. +!!! error TS2366: No best common type exists between 'A', 'A', and 'B'. var result3: B = true ? a : b; ~~~~~~~ -!!! Type '{}' is not assignable to type 'B': -!!! Property 'propertyB' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'B': +!!! error TS2322: Property 'propertyB' is missing in type '{}'. ~~~~~~~~~~~~ -!!! No best common type exists between 'B', 'A', and 'B'. +!!! error TS2366: No best common type exists between 'B', 'A', and 'B'. var result4: (t: X) => number = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! Type '{}' is not assignable to type '(t: X) => number'. +!!! error TS2323: Type '{}' is not assignable to type '(t: X) => number'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between '(t: X) => number', '(m: X) => number', and '(n: X) => string'. +!!! error TS2366: No best common type exists between '(t: X) => number', '(m: X) => number', and '(n: X) => string'. var result5: (t: X) => string = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! Type '{}' is not assignable to type '(t: X) => string'. +!!! error TS2323: Type '{}' is not assignable to type '(t: X) => string'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between '(t: X) => string', '(m: X) => number', and '(n: X) => string'. +!!! error TS2366: No best common type exists between '(t: X) => string', '(m: X) => number', and '(n: X) => string'. var result6: (t: X) => boolean = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! Type '{}' is not assignable to type '(t: X) => boolean'. +!!! error TS2323: Type '{}' is not assignable to type '(t: X) => boolean'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between '(t: X) => boolean', '(m: X) => number', and '(n: X) => string'. \ No newline at end of file +!!! error TS2366: No best common type exists between '(t: X) => boolean', '(m: X) => number', and '(n: X) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt b/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt index 9bf1480f8bb..dfd87465894 100644 --- a/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt +++ b/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D': + Named properties 'm' of types 'B' and 'D' are not identical. + + ==== tests/cases/compiler/conflictingMemberTypesInBases.ts (1 errors) ==== interface A { m: string; @@ -12,7 +16,7 @@ interface E extends B { } // Error here for extending B and D ~ -!!! Interface 'E' cannot simultaneously extend types 'B' and 'D': -!!! Named properties 'm' of types 'B' and 'D' are not identical. +!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D': +!!! error TS2320: Named properties 'm' of types 'B' and 'D' are not identical. interface E extends D { } // No duplicate error here \ No newline at end of file diff --git a/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt b/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt index 6bb45b67ee7..f1e7d2abeed 100644 --- a/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt +++ b/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt @@ -1,12 +1,18 @@ +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(2,10): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(2,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,10): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. + + ==== tests/cases/compiler/conflictingTypeAnnotatedVar.ts (4 errors) ==== var foo: string; function foo(): number { } ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. function foo(): number { } ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. \ No newline at end of file +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. \ No newline at end of file diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt index 3501f1b79be..b0a4a871f21 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(6,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(7,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(8,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts (3 errors) ==== class Base { foo() { } } class Derived1 extends Base { bar() { } } @@ -6,13 +11,13 @@ function foo(tagName: 'canvas'): Derived3; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: 'div'): Derived2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: 'span'): Derived1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: number): Base; function foo(tagName: any): Base { diff --git a/tests/baselines/reference/constraintErrors1.errors.txt b/tests/baselines/reference/constraintErrors1.errors.txt index f081959d028..2a6ef4f120f 100644 --- a/tests/baselines/reference/constraintErrors1.errors.txt +++ b/tests/baselines/reference/constraintErrors1.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/constraintErrors1.ts(1,25): error TS2304: Cannot find name 'hm'. + + ==== tests/cases/compiler/constraintErrors1.ts (1 errors) ==== function foo5(test: T) { } ~~ -!!! Cannot find name 'hm'. \ No newline at end of file +!!! error TS2304: Cannot find name 'hm'. \ No newline at end of file diff --git a/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.errors.txt b/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.errors.txt index 09a54bb89e9..15293f3953a 100644 --- a/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.errors.txt +++ b/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(5,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(8,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(10,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(13,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(21,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(21,28): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts (6 errors) ==== // used to be valid, now an error to do this @@ -5,21 +13,21 @@ } function f>() { ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I1> { // Error, any does not satisfy the constraint I1 ~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I2 { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I4 T> { ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } // No error @@ -29,9 +37,9 @@ function foo(v: V) => void>() { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } \ No newline at end of file diff --git a/tests/baselines/reference/constraintSatisfactionWithAny2.errors.txt b/tests/baselines/reference/constraintSatisfactionWithAny2.errors.txt index c3f3b04a441..b297d2be970 100644 --- a/tests/baselines/reference/constraintSatisfactionWithAny2.errors.txt +++ b/tests/baselines/reference/constraintSatisfactionWithAny2.errors.txt @@ -1,10 +1,13 @@ +tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithAny2.ts(4,25): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithAny2.ts (1 errors) ==== // errors expected for type parameter cannot be referenced in the constraints of the same list // any is not a valid type argument unless there is no constraint, or the constraint is any declare function foo(x: U) => Z>(y: T): Z; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var a: any; foo(a); diff --git a/tests/baselines/reference/constraints0.errors.txt b/tests/baselines/reference/constraints0.errors.txt index 1ace0a1b18f..ac16118149b 100644 --- a/tests/baselines/reference/constraints0.errors.txt +++ b/tests/baselines/reference/constraints0.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/constraints0.ts(14,9): error TS2343: Type 'B' does not satisfy the constraint 'A': + Property 'a' is missing in type 'B'. + + ==== tests/cases/compiler/constraints0.ts (1 errors) ==== interface A { a: number; @@ -14,7 +18,7 @@ var v1: C; // should work var v2: C; // should not work ~~~~ -!!! Type 'B' does not satisfy the constraint 'A': -!!! Property 'a' is missing in type 'B'. +!!! error TS2343: Type 'B' does not satisfy the constraint 'A': +!!! error TS2343: Property 'a' is missing in type 'B'. var y = v1.x.a; // 'a' should be of type 'number' \ No newline at end of file diff --git a/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.errors.txt b/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.errors.txt index 13b6be52ae2..b7375989e6b 100644 --- a/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.errors.txt +++ b/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts(3,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts(4,29): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts (2 errors) ==== interface Object { } class Foo { } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. class Bar { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. data: Foo; // Error 1 Type 'Object' does not satisfy the constraint 'T' for type parameter 'U extends T'. } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt index e33107575e4..373bd49f92d 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts(61,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2': + Types of property 'a' are incompatible: + Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number': + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts (1 errors) ==== // Checking basic subtype relations with construct signatures @@ -61,10 +67,10 @@ // S's interface I2 extends Base2 { ~~ -!!! Interface 'I2' incorrectly extends interface 'Base2': -!!! Types of property 'a' are incompatible: -!!! Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number': +!!! error TS2429: Type 'string' is not assignable to type 'number'. // N's a: new (x: number) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt index 2d267d5a260..4a2425cf3ac 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(41,19): error TS2429: Interface 'I2' incorrectly extends interface 'A': + Types of property 'a2' are incompatible: + Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]': + Types of parameters 'x' and 'x' are incompatible: + Type 'T' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(50,19): error TS2429: Interface 'I4' incorrectly extends interface 'A': + Types of property 'a8' are incompatible: + Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': + Types of parameters 'y' and 'y' are incompatible: + Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': + Types of parameters 'arg2' and 'arg2' are incompatible: + Type '{ foo: number; }' is not assignable to type 'Base': + Types of property 'foo' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts (2 errors) ==== // checking subtype relations for function types as it relates to contextual signature instantiation // error cases @@ -41,11 +57,11 @@ interface I2 extends A { ~~ -!!! Interface 'I2' incorrectly extends interface 'A': -!!! Types of property 'a2' are incompatible: -!!! Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'T' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'A': +!!! error TS2429: Types of property 'a2' are incompatible: +!!! error TS2429: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]': +!!! error TS2429: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type 'number'. a2: new (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic } @@ -56,15 +72,15 @@ interface I4 extends A { ~~ -!!! Interface 'I4' incorrectly extends interface 'A': -!!! Types of property 'a8' are incompatible: -!!! Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type '{ foo: number; }' is not assignable to type 'Base': -!!! Types of property 'foo' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'I4' incorrectly extends interface 'A': +!!! error TS2429: Types of property 'a8' are incompatible: +!!! error TS2429: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': +!!! error TS2429: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': +!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base': +!!! error TS2429: Types of property 'foo' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. a8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.errors.txt b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.errors.txt index 970bafa4927..d07dcad58c3 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.errors.txt +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters.ts(16,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters.ts(20,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters.ts(24,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters.ts(28,10): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters.ts (4 errors) ==== // Parameter properties are only valid in constructor definitions, not even in other forms of construct signatures @@ -16,23 +22,23 @@ interface I { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } interface I2 { new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var a: { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var b: { new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt index 5d208c89133..d17f52e90c1 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt @@ -1,67 +1,84 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,17): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,27): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,24): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,35): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,17): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(14,17): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(19,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(20,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(24,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(25,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(29,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(30,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(34,10): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(35,10): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts (15 errors) ==== // Parameter properties are not valid in overloads of constructors class C { constructor(public x, private y); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public x, private y) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. ~ -!!! Duplicate identifier 'y'. +!!! error TS2300: Duplicate identifier 'y'. } class C2 { constructor(private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } class C3 { constructor(private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private y) { } } interface I { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } interface I2 { new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var a: { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. new (public y); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var b: { new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. new (private y); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt b/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt index 2d08a7ae1c6..ceb828dd061 100644 --- a/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt +++ b/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts(32,11): error TS2428: All declarations of an interface must have identical type parameters. + + ==== tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts (1 errors) ==== // No errors expected for basic overloads of construct signatures with merged declarations @@ -32,7 +35,7 @@ interface I { ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. new (x: T, y?: number): C2; new (x: T, y: number): C2; } diff --git a/tests/baselines/reference/constructorArgsErrors1.errors.txt b/tests/baselines/reference/constructorArgsErrors1.errors.txt index 2b7754f8600..639a1a8d18a 100644 --- a/tests/baselines/reference/constructorArgsErrors1.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/constructorArgsErrors1.ts(2,18): error TS1090: 'static' modifier cannot appear on a parameter. + + ==== tests/cases/compiler/constructorArgsErrors1.ts (1 errors) ==== class foo { constructor (static a: number) { ~~~~~~ -!!! 'static' modifier cannot appear on a parameter. +!!! error TS1090: 'static' modifier cannot appear on a parameter. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorArgsErrors2.errors.txt b/tests/baselines/reference/constructorArgsErrors2.errors.txt index 75af2005138..dc60f1803bf 100644 --- a/tests/baselines/reference/constructorArgsErrors2.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors2.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/constructorArgsErrors2.ts(2,25): error TS1090: 'static' modifier cannot appear on a parameter. + + ==== tests/cases/compiler/constructorArgsErrors2.ts (1 errors) ==== class foo { constructor (public static a: number) { ~~~~~~ -!!! 'static' modifier cannot appear on a parameter. +!!! error TS1090: 'static' modifier cannot appear on a parameter. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorArgsErrors3.errors.txt b/tests/baselines/reference/constructorArgsErrors3.errors.txt index b01950da279..1eb4de31f6b 100644 --- a/tests/baselines/reference/constructorArgsErrors3.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors3.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/constructorArgsErrors3.ts(2,25): error TS1028: Accessibility modifier already seen. + + ==== tests/cases/compiler/constructorArgsErrors3.ts (1 errors) ==== class foo { constructor (public public a: number) { ~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorArgsErrors4.errors.txt b/tests/baselines/reference/constructorArgsErrors4.errors.txt index 431844358ee..44ca10ebff5 100644 --- a/tests/baselines/reference/constructorArgsErrors4.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors4.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/constructorArgsErrors4.ts(2,26): error TS1028: Accessibility modifier already seen. + + ==== tests/cases/compiler/constructorArgsErrors4.ts (1 errors) ==== class foo { constructor (private public a: number) { ~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorArgsErrors5.errors.txt b/tests/baselines/reference/constructorArgsErrors5.errors.txt index 176a2b7db06..04a4ea7fade 100644 --- a/tests/baselines/reference/constructorArgsErrors5.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors5.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/constructorArgsErrors5.ts(2,18): error TS1090: 'export' modifier cannot appear on a parameter. + + ==== tests/cases/compiler/constructorArgsErrors5.ts (1 errors) ==== class foo { constructor (export a: number) { ~~~~~~ -!!! 'export' modifier cannot appear on a parameter. +!!! error TS1090: 'export' modifier cannot appear on a parameter. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorAsType.errors.txt b/tests/baselines/reference/constructorAsType.errors.txt index 1824ae98c82..ca17d41623d 100644 --- a/tests/baselines/reference/constructorAsType.errors.txt +++ b/tests/baselines/reference/constructorAsType.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/constructorAsType.ts(1,5): error TS2323: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. + + ==== tests/cases/compiler/constructorAsType.ts (1 errors) ==== var Person:new () => {name: string;} = function () {return {name:"joe"};}; ~~~~~~ -!!! Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. +!!! error TS2323: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. var Person2:{new() : {name:string;};}; diff --git a/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt b/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt index 07bd240bfab..b7b2ac330ca 100644 --- a/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt +++ b/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt @@ -1,18 +1,23 @@ +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorDefaultValuesReferencingThis.ts(2,21): error TS2333: 'this' cannot be referenced in constructor arguments. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorDefaultValuesReferencingThis.ts(6,21): error TS2333: 'this' cannot be referenced in constructor arguments. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorDefaultValuesReferencingThis.ts(10,28): error TS2333: 'this' cannot be referenced in constructor arguments. + + ==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorDefaultValuesReferencingThis.ts (3 errors) ==== class C { constructor(x = this) { } ~~~~ -!!! 'this' cannot be referenced in constructor arguments. +!!! error TS2333: 'this' cannot be referenced in constructor arguments. } class D { constructor(x = this) { } ~~~~ -!!! 'this' cannot be referenced in constructor arguments. +!!! error TS2333: 'this' cannot be referenced in constructor arguments. } class E { constructor(public x = this) { } ~~~~ -!!! 'this' cannot be referenced in constructor arguments. +!!! error TS2333: 'this' cannot be referenced in constructor arguments. } \ No newline at end of file diff --git a/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt b/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt index 9e25a43bec6..c241aa8096d 100644 --- a/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt +++ b/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt @@ -1,9 +1,15 @@ +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(3,17): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,17): error TS2323: Type 'number' is not assignable to type 'T'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,27): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(17,17): error TS2323: Type 'Date' is not assignable to type 'T'. + + ==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts (4 errors) ==== class C { constructor(x); constructor(public x: string = 1) { // error ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var y = x; } } @@ -12,9 +18,9 @@ constructor(x: T, y: U); constructor(x: T = 1, public y: U = x) { // error ~~~~~~~~ -!!! Type 'number' is not assignable to type 'T'. +!!! error TS2323: Type 'number' is not assignable to type 'T'. ~~~~~~~~~~~~~~~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. var z = x; } } @@ -23,7 +29,7 @@ constructor(x); constructor(x: T = new Date()) { // error ~~~~~~~~~~~~~~~~~ -!!! Type 'Date' is not assignable to type 'T'. +!!! error TS2323: Type 'Date' is not assignable to type 'T'. var y = x; } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.errors.txt b/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.errors.txt index c2021bb97f1..8a15123dfc8 100644 --- a/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.errors.txt +++ b/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/constructorInvocationWithTooFewTypeArgs.ts(9,9): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/constructorInvocationWithTooFewTypeArgs.ts (1 errors) ==== class D { @@ -9,5 +12,5 @@ var d = new D(); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/constructorOverloads1.errors.txt b/tests/baselines/reference/constructorOverloads1.errors.txt index c11e69d12bb..4b57d5c7839 100644 --- a/tests/baselines/reference/constructorOverloads1.errors.txt +++ b/tests/baselines/reference/constructorOverloads1.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/constructorOverloads1.ts(7,5): error TS2392: Multiple constructor implementations are not allowed. +tests/cases/compiler/constructorOverloads1.ts(16,18): error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'number'. +tests/cases/compiler/constructorOverloads1.ts(17,18): error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'number'. + + ==== tests/cases/compiler/constructorOverloads1.ts (3 errors) ==== class Foo { constructor(s: string); @@ -11,7 +16,7 @@ } ~~~~~ -!!! Multiple constructor implementations are not allowed. +!!! error TS2392: Multiple constructor implementations are not allowed. bar1() { /*WScript.Echo("bar1");*/ } bar2() { /*WScript.Echo("bar1");*/ } } @@ -20,10 +25,10 @@ var f2 = new Foo(0); var f3 = new Foo(f1); ~~ -!!! Argument of type 'Foo' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'number'. var f4 = new Foo([f1,f2,f3]); ~~~~~~~~~~ -!!! Argument of type 'unknown[]' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'number'. f1.bar1(); f1.bar2(); diff --git a/tests/baselines/reference/constructorOverloads3.errors.txt b/tests/baselines/reference/constructorOverloads3.errors.txt index 0e106af99dc..4662a277f52 100644 --- a/tests/baselines/reference/constructorOverloads3.errors.txt +++ b/tests/baselines/reference/constructorOverloads3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/constructorOverloads3.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call. + + ==== tests/cases/compiler/constructorOverloads3.ts (1 errors) ==== declare class FooBase { constructor(s: string); @@ -12,7 +15,7 @@ constructor(a: any); constructor(x: any, y?: any) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. bar1() { /*WScript.Echo("Yo");*/} } diff --git a/tests/baselines/reference/constructorOverloads4.errors.txt b/tests/baselines/reference/constructorOverloads4.errors.txt index 5f46390fae1..4b272b3f264 100644 --- a/tests/baselines/reference/constructorOverloads4.errors.txt +++ b/tests/baselines/reference/constructorOverloads4.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/constructorOverloads4.ts(5,21): error TS2300: Duplicate identifier 'Function'. +tests/cases/compiler/constructorOverloads4.ts(6,21): error TS2300: Duplicate identifier 'Function'. +tests/cases/compiler/constructorOverloads4.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. +tests/cases/compiler/constructorOverloads4.ts(11,1): error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'? + + ==== tests/cases/compiler/constructorOverloads4.ts (4 errors) ==== declare module M { export class Function { @@ -5,17 +11,17 @@ } export function Function(...args: any[]): any; ~~~~~~~~ -!!! Duplicate identifier 'Function'. +!!! error TS2300: Duplicate identifier 'Function'. export function Function(...args: string[]): Function; ~~~~~~~~ -!!! Duplicate identifier 'Function'. +!!! error TS2300: Duplicate identifier 'Function'. } (new M.Function("return 5"))(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. M.Function("yo"); ~~~~~~~~~~~~~~~~ -!!! Value of type 'typeof Function' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/constructorOverloads5.errors.txt b/tests/baselines/reference/constructorOverloads5.errors.txt index 706d9854e14..dd7ec956eac 100644 --- a/tests/baselines/reference/constructorOverloads5.errors.txt +++ b/tests/baselines/reference/constructorOverloads5.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/constructorOverloads5.ts(6,18): error TS2300: Duplicate identifier 'RegExp'. + + ==== tests/cases/compiler/constructorOverloads5.ts (1 errors) ==== interface IArguments {} @@ -6,7 +9,7 @@ export function RegExp(pattern: string, flags: string): RegExp; export class RegExp { ~~~~~~ -!!! Duplicate identifier 'RegExp'. +!!! error TS2300: Duplicate identifier 'RegExp'. constructor(pattern: string); constructor(pattern: string, flags: string); exec(string: string): string[]; diff --git a/tests/baselines/reference/constructorOverloads6.errors.txt b/tests/baselines/reference/constructorOverloads6.errors.txt index 42256f68f8d..d5cf2486fe1 100644 --- a/tests/baselines/reference/constructorOverloads6.errors.txt +++ b/tests/baselines/reference/constructorOverloads6.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/constructorOverloads6.ts(4,25): error TS1111: A constructor implementation cannot be declared in an ambient context. + + ==== tests/cases/compiler/constructorOverloads6.ts (1 errors) ==== declare class FooBase { constructor(s: string); constructor(n: number); constructor(x: any) { ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. } bar1():void; diff --git a/tests/baselines/reference/constructorOverloads7.errors.txt b/tests/baselines/reference/constructorOverloads7.errors.txt index dab93a3cc27..4caa358e7bd 100644 --- a/tests/baselines/reference/constructorOverloads7.errors.txt +++ b/tests/baselines/reference/constructorOverloads7.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/constructorOverloads7.ts(15,10): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/constructorOverloads7.ts(22,18): error TS2384: Overload signatures must all be ambient or non-ambient. + + ==== tests/cases/compiler/constructorOverloads7.ts (2 errors) ==== declare class Point { @@ -15,7 +19,7 @@ // to be Point and return type is inferred to be void function Point(x, y) { ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. this.x = x; this.y = y; @@ -24,7 +28,7 @@ declare function EF1(a:number, b:number):number; ~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. function EF1(a,b) { return a+b; } \ No newline at end of file diff --git a/tests/baselines/reference/constructorOverloads8.errors.txt b/tests/baselines/reference/constructorOverloads8.errors.txt index 15f43a432f8..3aa7e509898 100644 --- a/tests/baselines/reference/constructorOverloads8.errors.txt +++ b/tests/baselines/reference/constructorOverloads8.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/constructorOverloads8.ts(3,5): error TS2392: Multiple constructor implementations are not allowed. + + ==== tests/cases/compiler/constructorOverloads8.ts (1 errors) ==== class C { constructor(x) { } constructor(y, x) { } // illegal, 2 constructor implementations ~~~~~~~~~~~~~~~~~~~~~ -!!! Multiple constructor implementations are not allowed. +!!! error TS2392: Multiple constructor implementations are not allowed. } class D { diff --git a/tests/baselines/reference/constructorOverloadsWithDefaultValues.errors.txt b/tests/baselines/reference/constructorOverloadsWithDefaultValues.errors.txt index f594e176269..8bb052da947 100644 --- a/tests/baselines/reference/constructorOverloadsWithDefaultValues.errors.txt +++ b/tests/baselines/reference/constructorOverloadsWithDefaultValues.errors.txt @@ -1,9 +1,13 @@ +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithDefaultValues.ts(3,17): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithDefaultValues.ts(10,17): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + ==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithDefaultValues.ts (2 errors) ==== class C { foo: string; constructor(x = 1); // error ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. constructor() { } } @@ -12,7 +16,7 @@ foo: string; constructor(x = 1); // error ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. constructor() { } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorParameterProperties.errors.txt b/tests/baselines/reference/constructorParameterProperties.errors.txt index b92f2fd9a8c..ed41bec0e4a 100644 --- a/tests/baselines/reference/constructorParameterProperties.errors.txt +++ b/tests/baselines/reference/constructorParameterProperties.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts(8,10): error TS2341: Property 'C.x' is inaccessible. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts(17,10): error TS2341: Property 'D.x' is inaccessible. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts(18,12): error TS2339: Property 'a' does not exist on type 'D'. + + ==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts (3 errors) ==== class C { y: string; @@ -8,7 +13,7 @@ var r = c.y; var r2 = c.x; // error ~~~ -!!! Property 'C.x' is inaccessible. +!!! error TS2341: Property 'C.x' is inaccessible. class D { y: T; @@ -19,7 +24,7 @@ var r = d.y; var r2 = d.x; // error ~~~ -!!! Property 'D.x' is inaccessible. +!!! error TS2341: Property 'D.x' is inaccessible. var r3 = d.a; // error ~ -!!! Property 'a' does not exist on type 'D'. \ No newline at end of file +!!! error TS2339: Property 'a' does not exist on type 'D'. \ No newline at end of file diff --git a/tests/baselines/reference/constructorParameterProperties2.errors.txt b/tests/baselines/reference/constructorParameterProperties2.errors.txt index b8b04833db8..e6535bbbd54 100644 --- a/tests/baselines/reference/constructorParameterProperties2.errors.txt +++ b/tests/baselines/reference/constructorParameterProperties2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(11,24): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2300: Duplicate identifier 'y'. + + ==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts (2 errors) ==== class C { y: number; @@ -11,7 +15,7 @@ y: number; constructor(public y: number) { } // error ~ -!!! Duplicate identifier 'y'. +!!! error TS2300: Duplicate identifier 'y'. } var d: D; @@ -21,7 +25,7 @@ y: number; constructor(private y: number) { } // error ~ -!!! Duplicate identifier 'y'. +!!! error TS2300: Duplicate identifier 'y'. } var e: E; diff --git a/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt b/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt index f784cd0b8bb..8bb04c59554 100644 --- a/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt +++ b/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts(8,9): error TS2301: Initializer of instance member variable 'b' cannot reference identifier 'x' declared in the constructor. +tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts(10,9): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts(16,9): error TS2301: Initializer of instance member variable 'b' cannot reference identifier 'y' declared in the constructor. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts (3 errors) ==== // Initializer expressions for instance member variables are evaluated in the scope of the class constructor // body but are not permitted to reference parameters or local variables of the constructor. @@ -8,11 +13,11 @@ class C { b = x; // error, evaluated in scope of constructor, cannot reference x ~ -!!! Initializer of instance member variable 'b' cannot reference identifier 'x' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'b' cannot reference identifier 'x' declared in the constructor. constructor(x: string) { x = 2; // error, x is string ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. } } @@ -20,7 +25,7 @@ class D { b = y; // error, evaluated in scope of constructor, cannot reference y ~ -!!! Initializer of instance member variable 'b' cannot reference identifier 'y' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'b' cannot reference identifier 'y' declared in the constructor. constructor(x: string) { var y = ""; } diff --git a/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt b/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt index 4afccf82d93..3220a4cd87c 100644 --- a/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt +++ b/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt @@ -1,14 +1,22 @@ +tests/cases/compiler/constructorParametersInVariableDeclarations.ts(2,17): error TS2304: Cannot find name 'x'. +tests/cases/compiler/constructorParametersInVariableDeclarations.ts(3,22): error TS2304: Cannot find name 'x'. +tests/cases/compiler/constructorParametersInVariableDeclarations.ts(4,23): error TS2304: Cannot find name 'x'. +tests/cases/compiler/constructorParametersInVariableDeclarations.ts(10,17): error TS2304: Cannot find name 'x'. +tests/cases/compiler/constructorParametersInVariableDeclarations.ts(11,22): error TS2304: Cannot find name 'x'. +tests/cases/compiler/constructorParametersInVariableDeclarations.ts(12,23): error TS2304: Cannot find name 'x'. + + ==== tests/cases/compiler/constructorParametersInVariableDeclarations.ts (6 errors) ==== class A { private a = x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. private b = { p: x }; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. private c = () => x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor(x: number) { } } @@ -16,13 +24,13 @@ class B { private a = x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. private b = { p: x }; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. private c = () => x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor() { var x = 1; } diff --git a/tests/baselines/reference/constructorParametersThatShadowExternalNamesInVariableDeclarations.errors.txt b/tests/baselines/reference/constructorParametersThatShadowExternalNamesInVariableDeclarations.errors.txt index 92619b68154..35e281c2fb6 100644 --- a/tests/baselines/reference/constructorParametersThatShadowExternalNamesInVariableDeclarations.errors.txt +++ b/tests/baselines/reference/constructorParametersThatShadowExternalNamesInVariableDeclarations.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/constructorParametersThatShadowExternalNamesInVariableDeclarations.ts(3,17): error TS2301: Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. +tests/cases/compiler/constructorParametersThatShadowExternalNamesInVariableDeclarations.ts(9,17): error TS2301: Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. + + ==== tests/cases/compiler/constructorParametersThatShadowExternalNamesInVariableDeclarations.ts (2 errors) ==== var x = 1; class A { private a = x; ~ -!!! Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. constructor(x: number) { } } @@ -11,7 +15,7 @@ class B { private a = x; ~ -!!! Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. constructor() { var x = ""; } diff --git a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt index fb2ac126a91..2ebd59b3d93 100644 --- a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt +++ b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/constructorReturnsInvalidType.ts(3,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class + + ==== tests/cases/compiler/constructorReturnsInvalidType.ts (1 errors) ==== class X { constructor() { return 1; ~ -!!! Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } foo() { } } diff --git a/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt b/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt index 494c28e89e9..4739f54397c 100644 --- a/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt +++ b/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/constructorStaticParamNameErrors.ts(4,18): error TS1003: Identifier expected. + + ==== tests/cases/compiler/constructorStaticParamNameErrors.ts (1 errors) ==== 'use strict' // static as constructor parameter name should give error if 'use strict' class test { constructor (static) { } ~~~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. } \ No newline at end of file diff --git a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt index 9fc31435515..f5ef669d31b 100644 --- a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt +++ b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class + + ==== tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts (2 errors) ==== // a class constructor may return an expression, it must be assignable to the class instance type to be valid @@ -12,7 +16,7 @@ constructor() { return 1; // error ~ -!!! Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } } @@ -28,7 +32,7 @@ constructor() { return { x: 1 }; // error ~~~~~~~~ -!!! Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } } diff --git a/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt b/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt index d7ba7dcf92b..c4d0c7ffb66 100644 --- a/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt @@ -1,12 +1,22 @@ +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(3,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(4,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(17,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(18,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(20,5): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(28,5): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(33,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(34,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/constructorsWithSpecializedSignatures.ts (8 errors) ==== // errors declare class C { constructor(x: "hi"); ~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: "foo"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: number); } @@ -21,14 +31,14 @@ class D { constructor(x: "hi"); ~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: "foo"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: number); constructor(x: "hi") { } ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. } // overloads are ok @@ -38,17 +48,17 @@ constructor(x: string); constructor(x: "hi") { } // error ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. } // errors interface I { new (x: "hi"); ~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. new (x: "foo"); ~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. new (x: number); } diff --git a/tests/baselines/reference/contextualTyping.errors.txt b/tests/baselines/reference/contextualTyping.errors.txt index 69bffcc5782..cea075477ee 100644 --- a/tests/baselines/reference/contextualTyping.errors.txt +++ b/tests/baselines/reference/contextualTyping.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. +tests/cases/compiler/contextualTyping.ts(207,10): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. + + ==== tests/cases/compiler/contextualTyping.ts (3 errors) ==== // DEFAULT INTERFACES interface IFoo { @@ -189,7 +194,7 @@ // contextually typing function declarations declare function EF1(a:number, b:number):number; ~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. function EF1(a,b) { return a+b; } @@ -209,7 +214,7 @@ function Point(x, y) { ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. this.x = x; this.y = y; @@ -234,5 +239,5 @@ interface B extends A { } var x: B = { }; ~ -!!! Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping11.errors.txt b/tests/baselines/reference/contextualTyping11.errors.txt index b6e8970c764..dca509faa30 100644 --- a/tests/baselines/reference/contextualTyping11.errors.txt +++ b/tests/baselines/reference/contextualTyping11.errors.txt @@ -1,6 +1,11 @@ +tests/cases/compiler/contextualTyping11.ts(1,13): error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]': + Type 'foo' is not assignable to type '{ id: number; }': + Property 'id' is missing in type 'foo'. + + ==== tests/cases/compiler/contextualTyping11.ts (1 errors) ==== class foo { public bar:{id:number;}[] = [({})]; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'foo[]' is not assignable to type '{ id: number; }[]': -!!! Type 'foo' is not assignable to type '{ id: number; }': -!!! Property 'id' is missing in type 'foo'. \ No newline at end of file +!!! error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]': +!!! error TS2322: Type 'foo' is not assignable to type '{ id: number; }': +!!! error TS2322: Property 'id' is missing in type 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping21.errors.txt b/tests/baselines/reference/contextualTyping21.errors.txt index 12f7d53db8f..999cfcbd769 100644 --- a/tests/baselines/reference/contextualTyping21.errors.txt +++ b/tests/baselines/reference/contextualTyping21.errors.txt @@ -1,6 +1,11 @@ +tests/cases/compiler/contextualTyping21.ts(1,36): error TS2322: Type '{}[]' is not assignable to type '{ id: number; }[]': + Type '{}' is not assignable to type '{ id: number; }': + Property 'id' is missing in type '{}'. + + ==== tests/cases/compiler/contextualTyping21.ts (1 errors) ==== var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1]; ~~~ -!!! Type '{}[]' is not assignable to type '{ id: number; }[]': -!!! Type '{}' is not assignable to type '{ id: number; }': -!!! Property 'id' is missing in type '{}'. \ No newline at end of file +!!! error TS2322: Type '{}[]' is not assignable to type '{ id: number; }[]': +!!! error TS2322: Type '{}' is not assignable to type '{ id: number; }': +!!! error TS2322: Property 'id' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping24.errors.txt b/tests/baselines/reference/contextualTyping24.errors.txt index 5c5a54d280b..2f7f24f9cac 100644 --- a/tests/baselines/reference/contextualTyping24.errors.txt +++ b/tests/baselines/reference/contextualTyping24.errors.txt @@ -1,6 +1,11 @@ +tests/cases/compiler/contextualTyping24.ts(1,55): error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number': + Types of parameters 'a' and 'a' are incompatible: + Type 'string' is not assignable to type '{ (): number; (i: number): number; }'. + + ==== tests/cases/compiler/contextualTyping24.ts (1 errors) ==== var foo:(a:{():number; (i:number):number; })=>number; foo = function(a:string){return 5}; ~~~ -!!! Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number': -!!! Types of parameters 'a' and 'a' are incompatible: -!!! Type 'string' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file +!!! error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number': +!!! error TS2322: Types of parameters 'a' and 'a' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping30.errors.txt b/tests/baselines/reference/contextualTyping30.errors.txt index 259f59faac7..3b2fbc8aac6 100644 --- a/tests/baselines/reference/contextualTyping30.errors.txt +++ b/tests/baselines/reference/contextualTyping30.errors.txt @@ -1,5 +1,9 @@ +tests/cases/compiler/contextualTyping30.ts(1,37): error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'number[]'. + Type '{}' is not assignable to type 'number'. + + ==== tests/cases/compiler/contextualTyping30.ts (1 errors) ==== function foo(param:number[]){}; foo([1, "a"]); ~~~~~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type 'number[]'. -!!! Type '{}' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'number[]'. +!!! error TS2345: Type '{}' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping33.errors.txt b/tests/baselines/reference/contextualTyping33.errors.txt index adf233b4934..8f83fc37ab1 100644 --- a/tests/baselines/reference/contextualTyping33.errors.txt +++ b/tests/baselines/reference/contextualTyping33.errors.txt @@ -1,5 +1,9 @@ +tests/cases/compiler/contextualTyping33.ts(1,66): error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. + Type '{}' is not assignable to type '{ (): number; (i: number): number; }'. + + ==== tests/cases/compiler/contextualTyping33.ts (1 errors) ==== function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. -!!! Type '{}' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. +!!! error TS2345: Type '{}' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping39.errors.txt b/tests/baselines/reference/contextualTyping39.errors.txt index 10be2415329..bba7954c73a 100644 --- a/tests/baselines/reference/contextualTyping39.errors.txt +++ b/tests/baselines/reference/contextualTyping39.errors.txt @@ -1,5 +1,9 @@ +tests/cases/compiler/contextualTyping39.ts(1,11): error TS2353: Neither type '() => string' nor type '() => number' is assignable to the other: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/contextualTyping39.ts (1 errors) ==== var foo = <{ (): number; }> function() { return "err"; }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '() => string' nor type '() => number' is assignable to the other: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2353: Neither type '() => string' nor type '() => number' is assignable to the other: +!!! error TS2353: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping41.errors.txt b/tests/baselines/reference/contextualTyping41.errors.txt index 6e95b0092ca..03859c4820e 100644 --- a/tests/baselines/reference/contextualTyping41.errors.txt +++ b/tests/baselines/reference/contextualTyping41.errors.txt @@ -1,5 +1,9 @@ +tests/cases/compiler/contextualTyping41.ts(1,11): error TS2353: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/contextualTyping41.ts (1 errors) ==== var foo = <{():number; (i:number):number; }> (function(){return "err";}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2353: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other: +!!! error TS2353: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping5.errors.txt b/tests/baselines/reference/contextualTyping5.errors.txt index b72968af35c..ad89eb5a71b 100644 --- a/tests/baselines/reference/contextualTyping5.errors.txt +++ b/tests/baselines/reference/contextualTyping5.errors.txt @@ -1,5 +1,9 @@ +tests/cases/compiler/contextualTyping5.ts(1,13): error TS2322: Type '{}' is not assignable to type '{ id: number; }': + Property 'id' is missing in type '{}'. + + ==== tests/cases/compiler/contextualTyping5.ts (1 errors) ==== class foo { public bar:{id:number;} = { }; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type '{}' is not assignable to type '{ id: number; }': -!!! Property 'id' is missing in type '{}'. \ No newline at end of file +!!! error TS2322: Type '{}' is not assignable to type '{ id: number; }': +!!! error TS2322: Property 'id' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfAccessors.errors.txt b/tests/baselines/reference/contextualTypingOfAccessors.errors.txt index 93ae5f85865..8d5b732d5f7 100644 --- a/tests/baselines/reference/contextualTypingOfAccessors.errors.txt +++ b/tests/baselines/reference/contextualTypingOfAccessors.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/contextualTypingOfAccessors.ts(8,8): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/contextualTypingOfAccessors.ts(11,8): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/contextualTypingOfAccessors.ts (2 errors) ==== // not contextually typing accessors @@ -8,11 +12,11 @@ x = { get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return (n)=>n }, set foo(x) {} ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt index eff83efa960..0f9fc64536b 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2322: Type '{}[]' is not assignable to type 'I': + Index signatures are incompatible: + Type '{}' is not assignable to type 'Date': + Property 'toDateString' is missing in type '{}'. + + ==== tests/cases/compiler/contextualTypingOfArrayLiterals1.ts (1 errors) ==== interface I { [x: number]: Date; @@ -5,10 +11,10 @@ var x3: I = [new Date(), 1]; ~~ -!!! Type '{}[]' is not assignable to type 'I': -!!! Index signatures are incompatible: -!!! Type '{}' is not assignable to type 'Date': -!!! Property 'toDateString' is missing in type '{}'. +!!! error TS2322: Type '{}[]' is not assignable to type 'I': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type '{}' is not assignable to type 'Date': +!!! error TS2322: Property 'toDateString' is missing in type '{}'. var r2 = x3[1]; r2.getDate(); \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt index 29ca48f0c28..c433bd1d8ca 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS2323: Type '{}' is not assignable to type '(a: A) => void'. +tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,26): error TS2366: No best common type exists between '(a: A) => void', '(a: C) => number', and '(b: number) => void'. + + ==== tests/cases/compiler/contextualTypingOfConditionalExpression2.ts (2 errors) ==== class A { foo: number; @@ -11,7 +15,7 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; ~~ -!!! Type '{}' is not assignable to type '(a: A) => void'. +!!! error TS2323: Type '{}' is not assignable to type '(a: A) => void'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between '(a: A) => void', '(a: C) => number', and '(b: number) => void'. +!!! error TS2366: No best common type exists between '(a: A) => void', '(a: C) => number', and '(b: number) => void'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt index 2a768d452bf..f7bac878950 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(16,32): error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. +tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(17,32): error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. + + ==== tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts (2 errors) ==== interface Collection { length: number; @@ -16,8 +20,8 @@ var f = (x: number) => { return x.toFixed() }; var r5 = _.forEach(c2, f); ~ -!!! Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. +!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. var r6 = _.forEach(c2, (x) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. +!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.errors.txt b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.errors.txt index 4f04803d0ad..11ff1126d67 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.errors.txt +++ b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/contextualTypingOfLambdaReturnExpression.ts(5,16): error TS2339: Property 'length' does not exist on type 'number'. +tests/cases/compiler/contextualTypingOfLambdaReturnExpression.ts(6,18): error TS2339: Property 'length' does not exist on type 'number'. + + ==== tests/cases/compiler/contextualTypingOfLambdaReturnExpression.ts (2 errors) ==== function callb(lam: (l: number) => void); function callb(lam: (n: string) => void); @@ -5,7 +9,7 @@ callb((a) => a.length); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. callb((a) => { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body ~~~~~~ -!!! Property 'length' does not exist on type 'number'. \ No newline at end of file +!!! error TS2339: Property 'length' does not exist on type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt index 2e3633b4d64..e512f2a4b55 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt @@ -1,11 +1,16 @@ +tests/cases/compiler/contextualTypingOfObjectLiterals.ts(4,1): error TS2322: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }': + Index signature is missing in type '{ x: string; }'. +tests/cases/compiler/contextualTypingOfObjectLiterals.ts(10,3): error TS2345: Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'. + + ==== tests/cases/compiler/contextualTypingOfObjectLiterals.ts (2 errors) ==== var obj1: { [x: string]: string; }; var obj2 = {x: ""}; obj1 = {}; // Ok obj1 = obj2; // Error - indexer doesn't match ~~~~ -!!! Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }': -!!! Index signature is missing in type '{ x: string; }'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }': +!!! error TS2322: Index signature is missing in type '{ x: string; }'. function f(x: { [s: string]: string }) { } @@ -13,4 +18,4 @@ f(obj1); // Ok f(obj2); // Error - indexer doesn't match ~~~~ -!!! Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt b/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt index a91abdb2954..27ce89c4714 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/contextualTypingOfObjectLiterals2.ts(5,18): error TS2339: Property 'hmm' does not exist on type 'string'. + + ==== tests/cases/compiler/contextualTypingOfObjectLiterals2.ts (1 errors) ==== interface Foo { foo: (t: string) => string; @@ -5,4 +8,4 @@ function f2(args: Foo) { } f2({ foo: s => s.hmm }) // 's' should be 'string', so this should be an error ~~~ -!!! Property 'hmm' does not exist on type 'string'. \ No newline at end of file +!!! error TS2339: Property 'hmm' does not exist on type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt index e9de74b27ec..e4d8a82c47e 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(2,22): error TS2339: Property 'foo' does not exist on type 'string'. + + ==== tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts (1 errors) ==== var f10: (x: T, b: () => (a: T) => void, y: T) => T; f10('', () => a => a.foo, ''); // a is string, fixed by first parameter ~~~ -!!! Property 'foo' does not exist on type 'string'. +!!! error TS2339: Property 'foo' does not exist on type 'string'. var r9 = f10('', () => (a => a.foo), 1); // now a should be any \ No newline at end of file diff --git a/tests/baselines/reference/contextuallyTypingOrOperator3.errors.txt b/tests/baselines/reference/contextuallyTypingOrOperator3.errors.txt index 8c22771ad8f..ca7385b9c29 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator3.errors.txt +++ b/tests/baselines/reference/contextuallyTypingOrOperator3.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/contextuallyTypingOrOperator3.ts(1,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/contextuallyTypingOrOperator3.ts (1 errors) ==== function foo(u: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var x3: U = u || u; } \ No newline at end of file diff --git a/tests/baselines/reference/continueInIterationStatement4.errors.txt b/tests/baselines/reference/continueInIterationStatement4.errors.txt index c0f4388cf79..bbc20570547 100644 --- a/tests/baselines/reference/continueInIterationStatement4.errors.txt +++ b/tests/baselines/reference/continueInIterationStatement4.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/continueInIterationStatement4.ts(1,15): error TS2304: Cannot find name 'something'. + + ==== tests/cases/compiler/continueInIterationStatement4.ts (1 errors) ==== for (var i in something) { ~~~~~~~~~ -!!! Cannot find name 'something'. +!!! error TS2304: Cannot find name 'something'. continue; } \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement1.errors.txt b/tests/baselines/reference/continueNotInIterationStatement1.errors.txt index 5f7d543a0aa..8643b4134e0 100644 --- a/tests/baselines/reference/continueNotInIterationStatement1.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement1.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/continueNotInIterationStatement1.ts(1,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. + + ==== tests/cases/compiler/continueNotInIterationStatement1.ts (1 errors) ==== continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. \ No newline at end of file +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement2.errors.txt b/tests/baselines/reference/continueNotInIterationStatement2.errors.txt index 0bfc41d7f72..f294be84b09 100644 --- a/tests/baselines/reference/continueNotInIterationStatement2.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement2.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/continueNotInIterationStatement2.ts(3,5): error TS1107: Jump target cannot cross function boundary. + + ==== tests/cases/compiler/continueNotInIterationStatement2.ts (1 errors) ==== while (true) { function f() { continue; ~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement3.errors.txt b/tests/baselines/reference/continueNotInIterationStatement3.errors.txt index d8627b4fc3a..5ef40d2f62a 100644 --- a/tests/baselines/reference/continueNotInIterationStatement3.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement3.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/continueNotInIterationStatement3.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. + + ==== tests/cases/compiler/continueNotInIterationStatement3.ts (1 errors) ==== switch (0) { default: continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. } \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement4.errors.txt b/tests/baselines/reference/continueNotInIterationStatement4.errors.txt index 91e7b26b578..1c80f7057b8 100644 --- a/tests/baselines/reference/continueNotInIterationStatement4.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement4.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/continueNotInIterationStatement4.ts(4,5): error TS1107: Jump target cannot cross function boundary. + + ==== tests/cases/compiler/continueNotInIterationStatement4.ts (1 errors) ==== TWO: while (true){ var x = () => { continue TWO; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget1.errors.txt b/tests/baselines/reference/continueTarget1.errors.txt index 1b93d9fc707..7b1f40e02f0 100644 --- a/tests/baselines/reference/continueTarget1.errors.txt +++ b/tests/baselines/reference/continueTarget1.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/continueTarget1.ts(2,3): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. + + ==== tests/cases/compiler/continueTarget1.ts (1 errors) ==== target: continue target; ~~~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. \ No newline at end of file +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget5.errors.txt b/tests/baselines/reference/continueTarget5.errors.txt index aa156707aa5..401c5874ee0 100644 --- a/tests/baselines/reference/continueTarget5.errors.txt +++ b/tests/baselines/reference/continueTarget5.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/continueTarget5.ts(5,7): error TS1107: Jump target cannot cross function boundary. + + ==== tests/cases/compiler/continueTarget5.ts (1 errors) ==== target: while (true) { @@ -5,7 +8,7 @@ while (true) { continue target; ~~~~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } } \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget6.errors.txt b/tests/baselines/reference/continueTarget6.errors.txt index 2177e50523d..2220467abcb 100644 --- a/tests/baselines/reference/continueTarget6.errors.txt +++ b/tests/baselines/reference/continueTarget6.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/continueTarget6.ts(2,3): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. + + ==== tests/cases/compiler/continueTarget6.ts (1 errors) ==== while (true) { continue target; ~~~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. } \ No newline at end of file diff --git a/tests/baselines/reference/copyrightWithNewLine1.errors.txt b/tests/baselines/reference/copyrightWithNewLine1.errors.txt index a389197bf39..680d783a1d9 100644 --- a/tests/baselines/reference/copyrightWithNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithNewLine1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find external module './greeter'. +tests/cases/compiler/copyrightWithNewLine1.ts(6,10): error TS2304: Cannot find name 'document'. + + ==== tests/cases/compiler/copyrightWithNewLine1.ts (2 errors) ==== /***************************** * (c) Copyright - Important @@ -5,10 +9,10 @@ import model = require("./greeter") ~~~~~~~~~~~ -!!! Cannot find external module './greeter'. +!!! error TS2307: Cannot find external module './greeter'. var el = document.getElementById('content'); ~~~~~~~~ -!!! Cannot find name 'document'. +!!! error TS2304: Cannot find name 'document'. var greeter = new model.Greeter(el); /** things */ greeter.start(); \ No newline at end of file diff --git a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt index 429764799e2..a4f792f2dae 100644 --- a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find external module './greeter'. +tests/cases/compiler/copyrightWithoutNewLine1.ts(5,10): error TS2304: Cannot find name 'document'. + + ==== tests/cases/compiler/copyrightWithoutNewLine1.ts (2 errors) ==== /***************************** * (c) Copyright - Important ****************************/ import model = require("./greeter") ~~~~~~~~~~~ -!!! Cannot find external module './greeter'. +!!! error TS2307: Cannot find external module './greeter'. var el = document.getElementById('content'); ~~~~~~~~ -!!! Cannot find name 'document'. +!!! error TS2304: Cannot find name 'document'. var greeter = new model.Greeter(el); /** things */ greeter.start(); \ No newline at end of file diff --git a/tests/baselines/reference/couldNotSelectGenericOverload.errors.txt b/tests/baselines/reference/couldNotSelectGenericOverload.errors.txt index 8a813a1b432..bafa2bc4237 100644 --- a/tests/baselines/reference/couldNotSelectGenericOverload.errors.txt +++ b/tests/baselines/reference/couldNotSelectGenericOverload.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/couldNotSelectGenericOverload.ts(3,11): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/couldNotSelectGenericOverload.ts(7,11): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/couldNotSelectGenericOverload.ts (2 errors) ==== function makeArray(items: T[]): T[] { return items; } var b = [1, ""]; var b1G = makeArray(1, ""); // any, no error ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var b2G = makeArray(b); // any[] function makeArray2(items: any[]): any[] { return items; } var b3G = makeArray2(1, ""); // error ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt index 3659bab73e8..15a1c7913bb 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(5,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D': + Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. + + ==== tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts (2 errors) ==== class C { private x = 1; @@ -5,12 +10,12 @@ class D extends C { } function foo(x: "hi", items: string[]): typeof foo; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: string, items: string[]): typeof foo { return null; } var a: D = foo("hi", []); ~ -!!! Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D': -!!! Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. +!!! error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D': +!!! error TS2322: Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. \ No newline at end of file diff --git a/tests/baselines/reference/crashIntypeCheckInvocationExpression.errors.txt b/tests/baselines/reference/crashIntypeCheckInvocationExpression.errors.txt index 46693ee5726..a1f5afbde13 100644 --- a/tests/baselines/reference/crashIntypeCheckInvocationExpression.errors.txt +++ b/tests/baselines/reference/crashIntypeCheckInvocationExpression.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/crashIntypeCheckInvocationExpression.ts(6,28): error TS2304: Cannot find name 'task'. +tests/cases/compiler/crashIntypeCheckInvocationExpression.ts(8,18): error TS2304: Cannot find name 'path'. +tests/cases/compiler/crashIntypeCheckInvocationExpression.ts(9,19): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/compiler/crashIntypeCheckInvocationExpression.ts(10,50): error TS2304: Cannot find name 'moduleType'. + + ==== tests/cases/compiler/crashIntypeCheckInvocationExpression.ts (4 errors) ==== var nake; function doCompile(fileset: P0, moduleType: P1) { @@ -6,16 +12,16 @@ } export var compileServer = task(() => { ~~~~ -!!! Cannot find name 'task'. +!!! error TS2304: Cannot find name 'task'. var folder = path.join(), ~~~~ -!!! Cannot find name 'path'. +!!! error TS2304: Cannot find name 'path'. fileset = nake.fileSetSync(folder) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. return doCompile(fileset, moduleType); ~~~~~~~~~~ -!!! Cannot find name 'moduleType'. +!!! error TS2304: Cannot find name 'moduleType'. }); \ No newline at end of file diff --git a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.errors.txt b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.errors.txt index 3399c75914c..a1a129795a4 100644 --- a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.errors.txt +++ b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/crashIntypeCheckObjectCreationExpression.ts(3,45): error TS2304: Cannot find name 'X'. + + ==== tests/cases/compiler/crashIntypeCheckObjectCreationExpression.ts (1 errors) ==== export class BuildWorkspaceService { public injectRequestService(service: P0) { this.injectBuildService(new X(service)); ~ -!!! Cannot find name 'X'. +!!! error TS2304: Cannot find name 'X'. } public injectBuildService(service: P0) { } diff --git a/tests/baselines/reference/crashOnMethodSignatures.errors.txt b/tests/baselines/reference/crashOnMethodSignatures.errors.txt index 014700b8135..1970d4270d4 100644 --- a/tests/baselines/reference/crashOnMethodSignatures.errors.txt +++ b/tests/baselines/reference/crashOnMethodSignatures.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/crashOnMethodSignatures.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/crashOnMethodSignatures.ts (1 errors) ==== class A { a(completed: () => any): void; ~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/crashRegressionTest.errors.txt b/tests/baselines/reference/crashRegressionTest.errors.txt index a08d1181397..316f796067a 100644 --- a/tests/baselines/reference/crashRegressionTest.errors.txt +++ b/tests/baselines/reference/crashRegressionTest.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/crashRegressionTest.ts(16,56): error TS2339: Property '_name' does not exist on type 'StringTemplate'. + + ==== tests/cases/compiler/crashRegressionTest.ts (1 errors) ==== module MsPortal.Util.TemplateEngine { "use strict"; @@ -16,7 +19,7 @@ public text(value?: string): any { this._templateStorage.templateSources[this._name] = value; ~~~~~ -!!! Property '_name' does not exist on type 'StringTemplate'. +!!! error TS2339: Property '_name' does not exist on type 'StringTemplate'. } } diff --git a/tests/baselines/reference/createArray.errors.txt b/tests/baselines/reference/createArray.errors.txt index 41426d307fa..6f79c4b47d2 100644 --- a/tests/baselines/reference/createArray.errors.txt +++ b/tests/baselines/reference/createArray.errors.txt @@ -1,26 +1,35 @@ +tests/cases/compiler/createArray.ts(1,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/createArray.ts(6,6): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/createArray.ts(7,19): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/createArray.ts(8,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/createArray.ts(1,12): error TS2304: Cannot find name 'number'. +tests/cases/compiler/createArray.ts(7,12): error TS2304: Cannot find name 'boolean'. +tests/cases/compiler/createArray.ts(8,12): error TS2304: Cannot find name 'string'. + + ==== tests/cases/compiler/createArray.ts (7 errors) ==== var na=new number[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. class C { } new C[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var ba=new boolean[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~~ -!!! Cannot find name 'boolean'. +!!! error TS2304: Cannot find name 'boolean'. var sa=new string[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. function f(s:string):number { return 0; } if (ba[14]) { diff --git a/tests/baselines/reference/customEventDetail.errors.txt b/tests/baselines/reference/customEventDetail.errors.txt index 7cddf40e6ff..f243dc64c34 100644 --- a/tests/baselines/reference/customEventDetail.errors.txt +++ b/tests/baselines/reference/customEventDetail.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/customEventDetail.ts(1,8): error TS2304: Cannot find name 'CustomEvent'. + + ==== tests/cases/compiler/customEventDetail.ts (1 errors) ==== var x: CustomEvent; ~~~~~~~~~~~ -!!! Cannot find name 'CustomEvent'. +!!! error TS2304: Cannot find name 'CustomEvent'. // valid since detail is any x.initCustomEvent('hello', true, true, { id: 12, name: 'hello' }); diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt index bb0e82e470b..4c0093a5438 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(6,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts (2 errors) ==== function /*1*/makePoint(x: number) { @@ -5,10 +9,10 @@ b: 10, get x() { return x; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set x(a: number) { this.b = a; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; }; var /*4*/point = makePoint(2); diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt index 17d42cfbbb1..961442c23d0 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts (1 errors) ==== function /*1*/makePoint(x: number) { return { get x() { return x; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; }; var /*4*/point = makePoint(2); diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt index 5499492feae..7680a8d14dc 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts (1 errors) ==== function /*1*/makePoint(x: number) { @@ -5,7 +8,7 @@ b: 10, set x(a: number) { this.b = a; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; }; var /*3*/point = makePoint(2); diff --git a/tests/baselines/reference/declFilePrivateStatic.errors.txt b/tests/baselines/reference/declFilePrivateStatic.errors.txt index 14d69a0653b..4e1da34b979 100644 --- a/tests/baselines/reference/declFilePrivateStatic.errors.txt +++ b/tests/baselines/reference/declFilePrivateStatic.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/declFilePrivateStatic.ts(9,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/declFilePrivateStatic.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/declFilePrivateStatic.ts(12,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/declFilePrivateStatic.ts(13,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/declFilePrivateStatic.ts (4 errors) ==== class C { @@ -9,15 +15,15 @@ private static get c() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static get d() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static set e(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set f(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/declInput-2.errors.txt b/tests/baselines/reference/declInput-2.errors.txt index a987b7ac179..ed0be8f64e5 100644 --- a/tests/baselines/reference/declInput-2.errors.txt +++ b/tests/baselines/reference/declInput-2.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/declInput-2.ts(10,9): error TS4031: Public property 'm22' of exported class has or is using private name 'C'. +tests/cases/compiler/declInput-2.ts(13,9): error TS4031: Public property 'm25' of exported class has or is using private name 'I2'. +tests/cases/compiler/declInput-2.ts(16,16): error TS4055: Return type of public method from exported class has or is using private name 'I2'. +tests/cases/compiler/declInput-2.ts(18,21): error TS4073: Parameter 'i' of public method from exported class has or is using private name 'I2'. +tests/cases/compiler/declInput-2.ts(19,16): error TS4055: Return type of public method from exported class has or is using private name 'C'. + + ==== tests/cases/compiler/declInput-2.ts (5 errors) ==== module M { class C { } @@ -10,23 +17,23 @@ public m2: string; public m22: C; // don't generate ~~~~~~~~~~~~~~ -!!! Public property 'm22' of exported class has or is using private name 'C'. +!!! error TS4031: Public property 'm22' of exported class has or is using private name 'C'. public m23: E; public m24: I1; public m25: I2; // don't generate ~~~~~~~~~~~~~~~ -!!! Public property 'm25' of exported class has or is using private name 'I2'. +!!! error TS4031: Public property 'm25' of exported class has or is using private name 'I2'. public m232(): E { return null;} public m242(): I1 { return null; } public m252(): I2 { return null; } // don't generate ~~~~ -!!! Return type of public method from exported class has or is using private name 'I2'. +!!! error TS4055: Return type of public method from exported class has or is using private name 'I2'. public m26(i:I1) {} public m262(i:I2) {} ~~~~ -!!! Parameter 'i' of public method from exported class has or is using private name 'I2'. +!!! error TS4073: Parameter 'i' of public method from exported class has or is using private name 'I2'. public m3():C { return new C(); } ~~ -!!! Return type of public method from exported class has or is using private name 'C'. +!!! error TS4055: Return type of public method from exported class has or is using private name 'C'. } } \ No newline at end of file diff --git a/tests/baselines/reference/declInput.errors.txt b/tests/baselines/reference/declInput.errors.txt index c2d4c37e9e6..2fbaf6db6bc 100644 --- a/tests/baselines/reference/declInput.errors.txt +++ b/tests/baselines/reference/declInput.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/declInput.ts(5,7): error TS2300: Duplicate identifier 'bar'. + + ==== tests/cases/compiler/declInput.ts (1 errors) ==== interface bar { @@ -5,7 +8,7 @@ class bar { ~~~ -!!! Duplicate identifier 'bar'. +!!! error TS2300: Duplicate identifier 'bar'. public f() { return ''; } public g() { return {a: null, b: undefined, c: void 4 }; } public h(x = 4, y = null, z = '') { x++; } diff --git a/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt b/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt index 91368320ba3..1f3960a87ab 100644 --- a/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt +++ b/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/declarationEmit_invalidReference2.ts(1,1): error TS6053: File 'tests/cases/compiler/invalid.ts' not found. + + ==== tests/cases/compiler/declarationEmit_invalidReference2.ts (1 errors) ==== /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! File 'invalid.ts' not found. +!!! error TS6053: File 'invalid.ts' not found. var x = 0; \ No newline at end of file diff --git a/tests/baselines/reference/declareAlreadySeen.errors.txt b/tests/baselines/reference/declareAlreadySeen.errors.txt index 0c765edf9dd..d606b571478 100644 --- a/tests/baselines/reference/declareAlreadySeen.errors.txt +++ b/tests/baselines/reference/declareAlreadySeen.errors.txt @@ -1,17 +1,23 @@ +tests/cases/compiler/declareAlreadySeen.ts(2,13): error TS1030: 'declare' modifier already seen. +tests/cases/compiler/declareAlreadySeen.ts(3,13): error TS1030: 'declare' modifier already seen. +tests/cases/compiler/declareAlreadySeen.ts(5,13): error TS1030: 'declare' modifier already seen. +tests/cases/compiler/declareAlreadySeen.ts(7,13): error TS1030: 'declare' modifier already seen. + + ==== tests/cases/compiler/declareAlreadySeen.ts (4 errors) ==== module M { declare declare var x; ~~~~~~~ -!!! 'declare' modifier already seen. +!!! error TS1030: 'declare' modifier already seen. declare declare function f(); ~~~~~~~ -!!! 'declare' modifier already seen. +!!! error TS1030: 'declare' modifier already seen. declare declare module N { } ~~~~~~~ -!!! 'declare' modifier already seen. +!!! error TS1030: 'declare' modifier already seen. declare declare class C { } ~~~~~~~ -!!! 'declare' modifier already seen. +!!! error TS1030: 'declare' modifier already seen. } \ No newline at end of file diff --git a/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt b/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt index 8fc743d97fe..10b2d8ec118 100644 --- a/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt +++ b/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/declareClassInterfaceImplementation.ts(5,15): error TS2421: Class 'Buffer' incorrectly implements interface 'IBuffer': + Index signature is missing in type 'Buffer'. + + ==== tests/cases/compiler/declareClassInterfaceImplementation.ts (1 errors) ==== interface IBuffer { [index: number]: number; @@ -5,8 +9,8 @@ declare class Buffer implements IBuffer { ~~~~~~ -!!! Class 'Buffer' incorrectly implements interface 'IBuffer': -!!! Index signature is missing in type 'Buffer'. +!!! error TS2421: Class 'Buffer' incorrectly implements interface 'IBuffer': +!!! error TS2421: Index signature is missing in type 'Buffer'. } \ No newline at end of file diff --git a/tests/baselines/reference/decrementAndIncrementOperators.errors.txt b/tests/baselines/reference/decrementAndIncrementOperators.errors.txt index 27c6c19ed1f..ec58db836a6 100644 --- a/tests/baselines/reference/decrementAndIncrementOperators.errors.txt +++ b/tests/baselines/reference/decrementAndIncrementOperators.errors.txt @@ -1,52 +1,67 @@ +tests/cases/compiler/decrementAndIncrementOperators.ts(4,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(6,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(7,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(9,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(10,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(12,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(13,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(15,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(16,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(18,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(19,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(21,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/compiler/decrementAndIncrementOperators.ts(22,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + + ==== tests/cases/compiler/decrementAndIncrementOperators.ts (13 errors) ==== var x = 0; // errors 1 ++; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (1)++; ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (1)--; ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++(1); ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --(1); ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (1 + 2)++; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (1 + 2)--; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++(1 + 2); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --(1 + 2); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (x + x)++; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (x + x)--; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++(x + x); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --(x + x); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. //OK x++; diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt index 5bc5153a610..31213ce2fd4 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt @@ -1,3 +1,49 @@ +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(24,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(25,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(26,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(27,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(28,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(30,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(31,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(32,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(33,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(34,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(37,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(39,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(42,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(43,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(46,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(47,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(48,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(48,27): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(49,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(49,27): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(50,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(50,27): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(51,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(52,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(54,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(55,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(56,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(56,25): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(57,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(57,25): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(58,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(58,25): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(59,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(60,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(63,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(65,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(70,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(71,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(72,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + + ==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts (44 errors) ==== // -- operator on any type var ANY1; @@ -24,138 +70,138 @@ // any type var var ResultIsNumber1 = --ANY2; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = --A; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = --M; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = --obj; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = --obj1; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = ANY2--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = A--; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = M--; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber9 = obj--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = obj1--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // any type literal var ResultIsNumber11 = --{}; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = --null; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = --undefined; ~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = null--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = {}--; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = undefined--; ~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // any type expressions var ResultIsNumber17 = --foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber18 = --A.foo(); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber19 = --(null + undefined); ~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber20 = --(null + null); ~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber21 = --(undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber22 = --obj1.x; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber23 = --obj1.y; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber24 = foo()--; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber25 = A.foo()--; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber26 = (null + undefined)--; ~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber27 = (null + null)--; ~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber28 = (undefined + undefined)--; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber29 = obj1.x--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber30 = obj1.y--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators --ANY2; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ANY2--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --ANY1--; ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --ANY1++; ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++ANY1--; ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --ANY2[0]--; ~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --ANY2[0]++; ~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++ANY2[0]--; ~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.errors.txt b/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.errors.txt index de547e5b70b..652aae1ab5a 100644 --- a/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.errors.txt @@ -1,3 +1,15 @@ +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(7,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(8,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(10,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(11,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(14,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(15,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(18,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(19,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(21,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(22,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts (10 errors) ==== // -- operator on enum type @@ -7,37 +19,37 @@ // enum type var var ResultIsNumber1 = --ENUM; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = --ENUM1; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = ENUM--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = ENUM1--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // enum type expressions var ResultIsNumber5 = --(ENUM[1] + ENUM[2]); ~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = (ENUM[1] + ENUM[2])--; ~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operator --ENUM; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --ENUM1; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ENUM--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ENUM1--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.errors.txt b/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.errors.txt index ced764db19e..8df7e508099 100644 --- a/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.errors.txt @@ -1,3 +1,25 @@ +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(18,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(19,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(22,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(23,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(24,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(26,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(27,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(28,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(31,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(32,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(33,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(35,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(36,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(37,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(40,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(41,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(42,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(44,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(45,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts(46,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + + ==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts (20 errors) ==== // -- operator on number type var NUMBER: number; @@ -18,70 +40,70 @@ //number type var var ResultIsNumber1 = --NUMBER1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = NUMBER1--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // number type literal var ResultIsNumber3 = --1; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber4 = --{ x: 1, y: 2}; ~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = --{ x: 1, y: (n: number) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = 1--; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber7 = { x: 1, y: 2 }--; ~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = { x: 1, y: (n: number) => { return n; } }--; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // number type expressions var ResultIsNumber9 = --foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber10 = --A.foo(); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber11 = --(NUMBER + NUMBER); ~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber12 = foo()--; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber13 = A.foo()--; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber14 = (NUMBER + NUMBER)--; ~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // miss assignment operator --1; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --NUMBER1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. 1--; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. NUMBER1--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()--; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.errors.txt b/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.errors.txt index 3f986e98e10..cef6decd4ad 100644 --- a/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.errors.txt @@ -1,3 +1,34 @@ +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(17,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(19,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(22,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(23,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(24,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(26,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(27,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(28,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(31,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(32,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(33,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(34,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(36,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(37,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(38,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(39,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(42,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(43,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(44,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(45,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(46,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(47,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(49,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(50,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(51,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(52,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(53,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(54,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts(54,11): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts (29 errors) ==== // -- operator on boolean type var BOOLEAN: boolean; @@ -17,97 +48,97 @@ // boolean type var var ResultIsNumber1 = --BOOLEAN; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = BOOLEAN--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // boolean type literal var ResultIsNumber3 = --true; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = --{ x: true, y: false }; ~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = --{ x: true, y: (n: boolean) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = true--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = { x: true, y: false }--; ~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = { x: true, y: (n: boolean) => { return n; } }--; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // boolean type expressions var ResultIsNumber9 = --objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = --M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber11 = --foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = --A.foo(); ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = foo()--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = A.foo()--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = objA.a--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = M.n--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators --true; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --BOOLEAN; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --objA.a, M.n; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. true--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. BOOLEAN--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. M.n--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a--, M.n--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.errors.txt b/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.errors.txt index 9ec8deb2081..7169155158c 100644 --- a/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.errors.txt @@ -1,3 +1,44 @@ +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(18,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(19,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(21,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(22,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(25,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(26,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(27,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(29,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(30,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(31,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(34,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(35,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(36,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(37,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(38,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(39,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(41,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(42,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(43,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(44,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(45,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(46,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(49,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(50,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(51,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(52,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(53,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(54,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(55,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(56,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(58,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(59,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(60,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(61,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(62,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(63,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(64,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(65,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts(65,11): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts (39 errors) ==== // -- operator on string type var STRING: string; @@ -18,127 +59,127 @@ // string type var var ResultIsNumber1 = --STRING; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = --STRING1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = STRING--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = STRING1--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // string type literal var ResultIsNumber5 = --""; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = --{ x: "", y: "" }; ~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = --{ x: "", y: (s: string) => { return s; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = ""--; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber9 = { x: "", y: "" }--; ~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = { x: "", y: (s: string) => { return s; } }--; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // string type expressions var ResultIsNumber11 = --objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = --M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = --STRING1[0]; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = --foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = --A.foo(); ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = --(STRING + STRING); ~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber17 = objA.a--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber18 = M.n--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber19 = STRING1[0]--; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber20 = foo()--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber21 = A.foo()--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber22 = (STRING + STRING)--; ~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators --""; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --STRING; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --STRING1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --STRING1[0]; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --objA.a, M.n; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ""--; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING1--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING1[0]--; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. M.n--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a--, M.n--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt b/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt index 2b8250f6fb4..d44594eb114 100644 --- a/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt +++ b/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt @@ -1,3 +1,15 @@ +tests/cases/compiler/defaultArgsForwardReferencing.ts(6,20): error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(11,21): error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(11,28): error TS2373: Initializer of parameter 'b' cannot reference identifier 'c' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(17,21): error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(23,25): error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(32,21): error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(33,16): error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(37,14): error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(37,21): error TS2373: Initializer of parameter 'b' cannot reference identifier 'c' declared after it. +tests/cases/compiler/defaultArgsForwardReferencing.ts(37,28): error TS2373: Initializer of parameter 'c' cannot reference identifier 'd' declared after it. + + ==== tests/cases/compiler/defaultArgsForwardReferencing.ts (10 errors) ==== function left(a, b = a, c = b) { a; @@ -6,16 +18,16 @@ function right(a = b, b = a) { ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. a; b; } function right2(a = b, b = c, c = a) { ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. ~ -!!! Initializer of parameter 'b' cannot reference identifier 'c' declared after it. +!!! error TS2373: Initializer of parameter 'b' cannot reference identifier 'c' declared after it. a; b; c; @@ -23,7 +35,7 @@ function inside(a = b) { ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. var b; } @@ -31,7 +43,7 @@ var b; function inside(a = b) { // Still an error because b is declared inside the function ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. var b; } } @@ -42,17 +54,17 @@ class C { constructor(a = b, b = 1) { } ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. method(a = b, b = 1) { } ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. } // Function expressions var x = (a = b, b = c, c = d) => { var d; }; ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. ~ -!!! Initializer of parameter 'b' cannot reference identifier 'c' declared after it. +!!! error TS2373: Initializer of parameter 'b' cannot reference identifier 'c' declared after it. ~ -!!! Initializer of parameter 'c' cannot reference identifier 'd' declared after it. \ No newline at end of file +!!! error TS2373: Initializer of parameter 'c' cannot reference identifier 'd' declared after it. \ No newline at end of file diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt index 7fb00da2b40..ff1f29a695d 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt @@ -1,38 +1,48 @@ +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(4,19): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(5,1): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(8,20): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(11,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(14,51): error TS2352: Neither type 'string' nor type 'number' is assignable to the other. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(17,41): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(20,62): error TS2352: Neither type 'string' nor type 'number' is assignable to the other. +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(28,15): error TS2304: Cannot find name 'T'. + + ==== tests/cases/compiler/defaultArgsInFunctionExpressions.ts (8 errors) ==== var f = function (a = 3) { return a; }; // Type should be (a?: number) => number var n: number = f(4); n = f(); var s: string = f(''); ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. s = f(); ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. // Type check the default argument with the type annotation var f2 = function (a: string = 3) { return a; }; // Should error, but be of type (a: string) => string; ~~~~~~~~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. s = f2(''); s = f2(); n = f2(); ~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. // Contextually type the default arg with the type annotation var f3 = function (a: (s: string) => any = (s) => s) { }; ~~~~~~~~~ -!!! Neither type 'string' nor type 'number' is assignable to the other. +!!! error TS2352: Neither type 'string' nor type 'number' is assignable to the other. // Type check using the function's contextual type var f4: (a: number) => void = function (a = "") { }; ~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. // Contextually type the default arg using the function's contextual type var f5: (a: (s: string) => any) => void = function (a = s => s) { }; ~~~~~~~~~ -!!! Neither type 'string' nor type 'number' is assignable to the other. +!!! error TS2352: Neither type 'string' nor type 'number' is assignable to the other. // Instantiated module module T { } @@ -42,7 +52,7 @@ var f6 = (t = T) => { }; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. var f7 = (t = U) => { return t; }; f7().x; \ No newline at end of file diff --git a/tests/baselines/reference/defaultArgsInOverloads.errors.txt b/tests/baselines/reference/defaultArgsInOverloads.errors.txt index 93f88560520..600c642c1f3 100644 --- a/tests/baselines/reference/defaultArgsInOverloads.errors.txt +++ b/tests/baselines/reference/defaultArgsInOverloads.errors.txt @@ -1,20 +1,27 @@ +tests/cases/compiler/defaultArgsInOverloads.ts(2,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/compiler/defaultArgsInOverloads.ts(7,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/compiler/defaultArgsInOverloads.ts(10,13): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/compiler/defaultArgsInOverloads.ts(16,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/compiler/defaultArgsInOverloads.ts(19,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + ==== tests/cases/compiler/defaultArgsInOverloads.ts (5 errors) ==== function fun(a: string); function fun(a = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function fun(a = null) { } class C { fun(a: string); fun(a = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. fun(a = null) { } static fun(a: string); static fun(a = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. static fun(a = null) { } } @@ -22,9 +29,9 @@ fun(a: string); fun(a = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } var f: (a = 3) => number; ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. \ No newline at end of file +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. \ No newline at end of file diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt index df98b965347..ada7f83af3d 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt @@ -1,10 +1,15 @@ +tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(4,6): error TS2339: Property 'length' does not exist on type '{}'. +tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(10,6): error TS2339: Property 'length' does not exist on type 'Object'. +tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(18,27): error TS2339: Property 'length' does not exist on type '{}'. + + ==== tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts (3 errors) ==== var obj1: {}; obj1.length; ~~~~~~ -!!! Property 'length' does not exist on type '{}'. +!!! error TS2339: Property 'length' does not exist on type '{}'. @@ -12,7 +17,7 @@ obj2.length; ~~~~~~ -!!! Property 'length' does not exist on type 'Object'. +!!! error TS2339: Property 'length' does not exist on type 'Object'. @@ -22,5 +27,5 @@ var elementCount = result.length; // would like to get an error by now ~~~~~~ -!!! Property 'length' does not exist on type '{}'. +!!! error TS2339: Property 'length' does not exist on type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/defaultValueInConstructorOverload1.errors.txt b/tests/baselines/reference/defaultValueInConstructorOverload1.errors.txt index c762d0919d9..1b399ef79fd 100644 --- a/tests/baselines/reference/defaultValueInConstructorOverload1.errors.txt +++ b/tests/baselines/reference/defaultValueInConstructorOverload1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/defaultValueInConstructorOverload1.ts(2,17): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + ==== tests/cases/compiler/defaultValueInConstructorOverload1.ts (1 errors) ==== class C { constructor(x = ''); ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. constructor(x = '') { } } \ No newline at end of file diff --git a/tests/baselines/reference/defaultValueInFunctionOverload1.errors.txt b/tests/baselines/reference/defaultValueInFunctionOverload1.errors.txt index 283e287e9da..2bb41299e38 100644 --- a/tests/baselines/reference/defaultValueInFunctionOverload1.errors.txt +++ b/tests/baselines/reference/defaultValueInFunctionOverload1.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/defaultValueInFunctionOverload1.ts(1,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + ==== tests/cases/compiler/defaultValueInFunctionOverload1.ts (1 errors) ==== function foo(x: string = ''); ~~~~~~~~~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function foo(x = '') { } \ No newline at end of file diff --git a/tests/baselines/reference/defaultValueInFunctionTypes.errors.txt b/tests/baselines/reference/defaultValueInFunctionTypes.errors.txt index 22a0c718c7c..01a807b3e7d 100644 --- a/tests/baselines/reference/defaultValueInFunctionTypes.errors.txt +++ b/tests/baselines/reference/defaultValueInFunctionTypes.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/defaultValueInFunctionTypes.ts(1,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + ==== tests/cases/compiler/defaultValueInFunctionTypes.ts (1 errors) ==== var x: (a: number = 1) => number; ~~~~~~~~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. var y = <(a : string = "") => any>(undefined) \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperator1.errors.txt b/tests/baselines/reference/deleteOperator1.errors.txt index 7a80456b21e..095d4c37100 100644 --- a/tests/baselines/reference/deleteOperator1.errors.txt +++ b/tests/baselines/reference/deleteOperator1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/deleteOperator1.ts(4,5): error TS2323: Type 'boolean' is not assignable to type 'number'. + + ==== tests/cases/compiler/deleteOperator1.ts (1 errors) ==== var a; var x: boolean = delete a; var y: any = delete a; var z: number = delete a; ~ -!!! Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt b/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt index 89980ef9bc0..5f7c6d70450 100644 --- a/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,20): error TS1005: ',' expected. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,27): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,23): error TS1109: Expression expected. + + ==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts (3 errors) ==== // Unary operator delete var ANY; @@ -5,14 +10,14 @@ // operand before delete operator var BOOLEAN1 = ANY delete ; //expect error ~~~~~~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // miss an operand var BOOLEAN2 = delete ; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // delete global variable s class testADelx { diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt index 18382a6f453..73ddab1a33c 100644 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. + + ==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts (3 errors) ==== // delete operator on any type @@ -45,13 +50,13 @@ var ResultIsBoolean16 = delete (ANY + ANY1); var ResultIsBoolean17 = delete (null + undefined); ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsBoolean18 = delete (null + null); ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsBoolean19 = delete (undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. // multiple delete operators var ResultIsBoolean20 = delete delete ANY; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.errors.txt b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.errors.txt index 363892227ff..40610b5b838 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.errors.txt +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassConstructorWithoutSuperCall.ts(8,5): error TS2377: Constructors for derived classes must contain a 'super' call. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassConstructorWithoutSuperCall.ts(17,5): error TS2377: Constructors for derived classes must contain a 'super' call. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassConstructorWithoutSuperCall.ts(18,24): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassConstructorWithoutSuperCall.ts(23,5): error TS2377: Constructors for derived classes must contain a 'super' call. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassConstructorWithoutSuperCall.ts(24,31): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors + + ==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassConstructorWithoutSuperCall.ts (5 errors) ==== // derived class constructors must contain a super call @@ -10,7 +17,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } class Base2 { @@ -23,10 +30,10 @@ var r2 = () => super(); // error for misplaced super call (nested function) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } class Derived3 extends Base2 { @@ -35,10 +42,10 @@ var r = function () { super() } // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } class Derived4 extends Base2 { diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt index 35b6ca92c18..994dead5904 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt @@ -1,25 +1,33 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(10,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': + Types of property 'x' are incompatible: + Type '() => number' is not assignable to type 'number'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(11,5): error TS2426: Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member function. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts (4 errors) ==== class Base { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set x(v) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } // error class Derived extends Base { ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Types of property 'x' are incompatible: -!!! Type '() => number' is not assignable to type 'number'. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type '() => number' is not assignable to type 'number'. x() { ~ -!!! Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member function. +!!! error TS2426: Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member function. return 1; } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt b/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt index 307aad8dd2e..f8e52d3e575 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt @@ -1,22 +1,28 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts (4 errors) ==== class Base { a: string; b() { } get c() { return ''; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set c(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static r: string; static s() { } static get t() { return ''; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set t(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. constructor(x) { } } diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt index 3eb2f197ca0..275701c797c 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts(8,7): error TS2416: Class 'DerivedClass' incorrectly extends base class 'BaseClass': + Private property '_init' cannot be reimplemented. + + ==== tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts (1 errors) ==== class BaseClass { constructor() { @@ -8,8 +12,8 @@ } class DerivedClass extends BaseClass { ~~~~~~~~~~~~ -!!! Class 'DerivedClass' incorrectly extends base class 'BaseClass': -!!! Private property '_init' cannot be reimplemented. +!!! error TS2416: Class 'DerivedClass' incorrectly extends base class 'BaseClass': +!!! error TS2416: Private property '_init' cannot be reimplemented. constructor() { super(); } diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt index c6d8f230589..8f12f02bc3a 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts(5,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts(13,7): error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': + Private property 'y' cannot be reimplemented. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts (2 errors) ==== class Base { private x: { foo: string }; @@ -5,8 +11,8 @@ class Derived extends Base { ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Private property 'x' cannot be reimplemented. private x: { foo: string; bar: string; }; // error } @@ -16,7 +22,7 @@ class Derived2 extends Base2 { ~~~~~~~~ -!!! Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': -!!! Private property 'y' cannot be reimplemented. +!!! error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': +!!! error TS2418: Private property 'y' cannot be reimplemented. private static y: { foo: string; bar: string; }; // error } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt b/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt index efd8f968ea3..9292ff64411 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(13,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(29,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(30,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts (8 errors) ==== var x: { foo: string; } var y: { foo: string; bar: string; } @@ -7,20 +17,20 @@ b(a: typeof x) { } get c() { return x; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set c(v: typeof x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. d: (a: typeof x) => void; static r: typeof x; static s(a: typeof x) { } static get t() { return x; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set t(v: typeof x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static u: (a: typeof x) => void; constructor(a: typeof x) { } @@ -31,20 +41,20 @@ b(a: typeof y) { } get c() { return y; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set c(v: typeof y) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. d: (a: typeof y) => void; static r: typeof y; static s(a: typeof y) { } static get t() { return y; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set t(a: typeof y) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static u: (a: typeof y) => void; constructor(a: typeof y) { super(x) } diff --git a/tests/baselines/reference/derivedClassParameterProperties.errors.txt b/tests/baselines/reference/derivedClassParameterProperties.errors.txt index cd7d774b30c..0dba0d24cb0 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.errors.txt +++ b/tests/baselines/reference/derivedClassParameterProperties.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(15,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(30,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(56,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(79,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + + ==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts (4 errors) ==== // ordering of super calls in derived constructors matters depending on other class contents @@ -21,7 +27,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived3 extends Base { @@ -41,7 +47,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived5 extends Base { @@ -74,7 +80,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived8 extends Base { @@ -103,7 +109,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived10 extends Base2 { diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.errors.txt b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.errors.txt index 6c2625223c2..b58d5ad8ffe 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(8,8): error TS1110: Type expected. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(16,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(20,15): error TS1110: Type expected. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(24,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(8,8): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(10,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(13,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(17,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(20,15): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(22,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(25,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts(29,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors + + ==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts (14 errors) ==== // error to use super calls outside a constructor @@ -8,53 +24,53 @@ class Derived extends Base { a: super(); ~~~~~ -!!! Type expected. +!!! error TS1110: Type expected. ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors b() { super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } get C() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors return 1; } set C(v) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } static a: super(); ~~~~~ -!!! Type expected. +!!! error TS1110: Type expected. ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors static b() { super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } static get C() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors return 1; } static set C(v) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt index 86a6a4d37e4..ef43d1d6f52 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(20,21): error TS2332: 'this' cannot be referenced in current location. + + ==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (2 errors) ==== class Base { x: string; @@ -14,7 +18,7 @@ constructor(public a: string) { super(this); // error ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. } } @@ -22,7 +26,7 @@ constructor(public a: string) { super(() => this); // error ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. } } diff --git a/tests/baselines/reference/derivedClassTransitivity.errors.txt b/tests/baselines/reference/derivedClassTransitivity.errors.txt index c5e60abe5d4..0915f921fe1 100644 --- a/tests/baselines/reference/derivedClassTransitivity.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C': + Types of property 'foo' are incompatible: + Type '(x?: string) => void' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts (1 errors) ==== // subclassing is not transitive when you can remove required parameters and add optional parameters @@ -18,10 +25,10 @@ var e: E; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'foo' are incompatible: -!!! Type '(x?: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x?: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(1); var r2 = e.foo(''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity2.errors.txt b/tests/baselines/reference/derivedClassTransitivity2.errors.txt index b2b3fca8979..db89f608d16 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity2.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C': + Types of property 'foo' are incompatible: + Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void': + Types of parameters 'y' and 'y' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts (1 errors) ==== // subclassing is not transitive when you can remove required parameters and add optional parameters @@ -18,10 +25,10 @@ var e: E; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(1, 1); var r2 = e.foo(1, ''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity3.errors.txt b/tests/baselines/reference/derivedClassTransitivity3.errors.txt index 8013f894b30..09b5cbe0dfd 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity3.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C': + Types of property 'foo' are incompatible: + Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void': + Types of parameters 'y' and 'y' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts (1 errors) ==== // subclassing is not transitive when you can remove required parameters and add optional parameters @@ -18,10 +25,10 @@ var e: E; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var r = c.foo('', ''); var r2 = e.foo('', 1); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithAny.errors.txt b/tests/baselines/reference/derivedClassWithAny.errors.txt index ca961b5e1bb..d7f0665a9e5 100644 --- a/tests/baselines/reference/derivedClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedClassWithAny.errors.txt @@ -1,9 +1,20 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(19,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(38,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(44,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(57,1): error TS2322: Type 'E' is not assignable to type 'C': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts (7 errors) ==== class C { x: number; get X(): number { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): number { return 1; } @@ -11,7 +22,7 @@ static y: number; static get Y(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } static bar(): number { @@ -23,7 +34,7 @@ x: any; get X(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } foo(): any { @@ -33,7 +44,7 @@ static y: any; static get Y(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } static bar(): any { @@ -46,7 +57,7 @@ x: string; get X(): string{ return ''; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): string { return ''; } @@ -54,7 +65,7 @@ static y: string; static get Y(): string { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } static bar(): string { @@ -69,8 +80,8 @@ c = d; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt index c467c553096..5bd992fa0b7 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(18,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(19,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(12,7): error TS2416: Class 'Derived' incorrectly extends base class 'Base': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(22,14): error TS2339: Property 'x' does not exist on type 'typeof Base'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(23,18): error TS2339: Property 'x' does not exist on type 'typeof Derived'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(25,15): error TS2339: Property 'fn' does not exist on type 'typeof Base'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(26,18): error TS2339: Property 'fn' does not exist on type 'typeof Derived'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(28,15): error TS2339: Property 'a' does not exist on type 'typeof Base'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(29,6): error TS2339: Property 'a' does not exist on type 'typeof Base'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(31,18): error TS2339: Property 'a' does not exist on type 'typeof Derived'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(32,9): error TS2339: Property 'a' does not exist on type 'typeof Derived'. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts (13 errors) ==== class Base { public x: string; @@ -7,17 +23,17 @@ public get a() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set a(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } // error, not a subtype class Derived extends Base { ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Private property 'x' cannot be reimplemented. private x: string; private fn(): string { return ''; @@ -25,36 +41,36 @@ private get a() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private set a(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var r = Base.x; // ok ~ -!!! Property 'x' does not exist on type 'typeof Base'. +!!! error TS2339: Property 'x' does not exist on type 'typeof Base'. var r2 = Derived.x; // error ~ -!!! Property 'x' does not exist on type 'typeof Derived'. +!!! error TS2339: Property 'x' does not exist on type 'typeof Derived'. var r3 = Base.fn(); // ok ~~ -!!! Property 'fn' does not exist on type 'typeof Base'. +!!! error TS2339: Property 'fn' does not exist on type 'typeof Base'. var r4 = Derived.fn(); // error ~~ -!!! Property 'fn' does not exist on type 'typeof Derived'. +!!! error TS2339: Property 'fn' does not exist on type 'typeof Derived'. var r5 = Base.a; // ok ~ -!!! Property 'a' does not exist on type 'typeof Base'. +!!! error TS2339: Property 'a' does not exist on type 'typeof Base'. Base.a = 2; // ok ~ -!!! Property 'a' does not exist on type 'typeof Base'. +!!! error TS2339: Property 'a' does not exist on type 'typeof Base'. var r6 = Derived.a; // error ~ -!!! Property 'a' does not exist on type 'typeof Derived'. +!!! error TS2339: Property 'a' does not exist on type 'typeof Derived'. Derived.a = 2; // error ~ -!!! Property 'a' does not exist on type 'typeof Derived'. \ No newline at end of file +!!! error TS2339: Property 'a' does not exist on type 'typeof Derived'. \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt index 9d5ee129541..5ac30473e29 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt @@ -1,3 +1,15 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(7,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(8,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(19,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(20,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(13,7): error TS2418: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(24,10): error TS2341: Property 'Derived.x' is inaccessible. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(27,10): error TS2341: Property 'Derived.fn' is inaccessible. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(32,10): error TS2341: Property 'Derived.a' is inaccessible. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(33,1): error TS2341: Property 'Derived.a' is inaccessible. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts (9 errors) ==== class Base { public static x: string; @@ -7,18 +19,18 @@ public static get a() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public static set a(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } // BUG 847404 // should be error class Derived extends Base { ~~~~~~~ -!!! Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2418: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': +!!! error TS2418: Private property 'x' cannot be reimplemented. private static x: string; private static fn(): string { return ''; @@ -26,28 +38,28 @@ private static get a() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static set a(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var r = Base.x; // ok var r2 = Derived.x; // error ~~~~~~~~~ -!!! Property 'Derived.x' is inaccessible. +!!! error TS2341: Property 'Derived.x' is inaccessible. var r3 = Base.fn(); // ok var r4 = Derived.fn(); // error ~~~~~~~~~~ -!!! Property 'Derived.fn' is inaccessible. +!!! error TS2341: Property 'Derived.fn' is inaccessible. var r5 = Base.a; // ok Base.a = 2; // ok var r6 = Derived.a; // error ~~~~~~~~~ -!!! Property 'Derived.a' is inaccessible. +!!! error TS2341: Property 'Derived.a' is inaccessible. Derived.a = 2; // error ~~~~~~~~~ -!!! Property 'Derived.a' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'Derived.a' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.errors.txt b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.errors.txt index 2d453788701..75720d86404 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.errors.txt +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor.ts(11,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor.ts(24,9): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor.ts (2 errors) ==== class Base { a = 1; @@ -11,7 +15,7 @@ var r = new Derived(); // error ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2 = new Derived(1); class Base2 { @@ -26,5 +30,5 @@ var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(new Date()); // ok \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.errors.txt b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.errors.txt index 62dc521d94a..b699fb7c89e 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.errors.txt +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor2.ts(13,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor2.ts(30,9): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor2.ts (2 errors) ==== class Base { a = 1; @@ -13,7 +17,7 @@ var r = new Derived(); // error ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2 = new Derived(1); var r3 = new Derived(1, 2); var r4 = new Derived(1, 2, 3); @@ -32,7 +36,7 @@ var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(new Date()); // ok var d3 = new D(new Date(), new Date()); var d4 = new D(new Date(), new Date(), new Date()); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt index 5e524399caa..6b9619cdac6 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(21,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(22,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(44,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts(45,10): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts (4 errors) ==== // automatic constructors with a class hieararchy of depth > 2 @@ -21,10 +27,10 @@ var r = new Derived(); // error ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2 = new Derived2(1); // error ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r3 = new Derived('', ''); class Base2 { @@ -48,8 +54,8 @@ var d = new D2(); // error ~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D2(new Date()); // error ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d3 = new D2(new Date(), new Date()); // ok \ No newline at end of file diff --git a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt index 8464f8b3d0b..ef0c9851ad7 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt @@ -1,9 +1,20 @@ +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,25): error TS2323: Type 'string' is not assignable to type 'T'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(32,16): error TS2323: Type 'string' is not assignable to type 'T'. +tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2322: Type 'E' is not assignable to type 'C': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts (7 errors) ==== class C { x: T; get X(): T { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): T { return null; } @@ -13,7 +24,7 @@ x: any; get X(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } foo(): any { @@ -23,7 +34,7 @@ static y: any; static get Y(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } static bar(): any { @@ -36,13 +47,13 @@ x: T; get X(): T { return ''; } // error ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2323: Type 'string' is not assignable to type 'T'. foo(): T { return ''; // error ~~ -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2323: Type 'string' is not assignable to type 'T'. } } @@ -53,7 +64,7 @@ c = d; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt b/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt index cdde532333b..e1c43f1bb36 100644 --- a/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt +++ b/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/derivedInterfaceCallSignature.ts(11,11): error TS2429: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath': + Types of property 'x' are incompatible: + Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. + + ==== tests/cases/compiler/derivedInterfaceCallSignature.ts (1 errors) ==== interface D3SvgPath { (data: any, index?: number): string; @@ -11,9 +16,9 @@ interface D3SvgArea extends D3SvgPath { ~~~~~~~~~ -!!! Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath': -!!! Types of property 'x' are incompatible: -!!! Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. +!!! error TS2429: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. x(x: (data: any, index?: number) => number): D3SvgArea; y(y: (data: any, index?: number) => number): D3SvgArea; y0(): (data: any, index?: number) => number; diff --git a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt index 444ee245377..a2e81b0eb95 100644 --- a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt +++ b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(7,5): error TS2411: Property '1' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(7,5): error TS2412: Property '1' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(11,5): error TS2411: Property ''1'' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(11,5): error TS2412: Property ''1'' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(15,5): error TS2411: Property 'foo' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(19,5): error TS2411: Property 'foo' of type '() => { x: number; }' is not assignable to string index type '{ x: number; }'. +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(24,5): error TS2412: Property '1' of type '{ x: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(28,5): error TS2300: Duplicate identifier ''1''. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts (8 errors) ==== interface Base { [x: number]: { x: number; y: number; }; @@ -7,40 +17,40 @@ interface Derived extends Base { 1: { y: number } // error ~~~~~~~~~~~~~~~~ -!!! Property '1' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +!!! error TS2411: Property '1' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. ~~~~~~~~~~~~~~~~ -!!! Property '1' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +!!! error TS2412: Property '1' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. } interface Derived2 extends Base { '1': { y: number } // error ~~~~~~~~~~~~~~~~~~ -!!! Property ''1'' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +!!! error TS2411: Property ''1'' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. ~~~~~~~~~~~~~~~~~~ -!!! Property ''1'' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +!!! error TS2412: Property ''1'' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. } interface Derived3 extends Base { foo: { y: number } // error ~~~~~~~~~~~~~~~~~~ -!!! Property 'foo' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +!!! error TS2411: Property 'foo' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. } interface Derived4 extends Base { foo(): { x: number } // error ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'foo' of type '() => { x: number; }' is not assignable to string index type '{ x: number; }'. +!!! error TS2411: Property 'foo' of type '() => { x: number; }' is not assignable to string index type '{ x: number; }'. } // satisifies string indexer but not numeric indexer interface Derived5 extends Base { 1: { x: number } // error ~~~~~~~~~~~~~~~~ -!!! Property '1' of type '{ x: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +!!! error TS2412: Property '1' of type '{ x: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. } interface Derived5 extends Base { '1': { x: number } // error ~~~ -!!! Duplicate identifier ''1''. +!!! error TS2300: Duplicate identifier ''1''. } \ No newline at end of file diff --git a/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.errors.txt b/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.errors.txt index cf63d1a7198..3410867f818 100644 --- a/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.errors.txt +++ b/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/derivedTypeCallingBaseImplWithOptionalParams.ts(13,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/derivedTypeCallingBaseImplWithOptionalParams.ts (1 errors) ==== interface MyInterface { myMethod(...myList: any[]); @@ -13,4 +16,4 @@ var y: MyClass = new MyClass(); y.myMethod(); // error ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt b/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt index 9247d98d03d..643979a8ef8 100644 --- a/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt +++ b/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(21,11): error TS2429: Interface 'F' incorrectly extends interface 'E': + Index signatures are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(29,11): error TS2429: Interface 'H' incorrectly extends interface 'G': + Index signatures are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/derivedTypeIncompatibleSignatures.ts (2 errors) ==== interface A { (a: string): string; @@ -21,9 +29,9 @@ interface F extends E { ~ -!!! Interface 'F' incorrectly extends interface 'E': -!!! Index signatures are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'F' incorrectly extends interface 'E': +!!! error TS2429: Index signatures are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. [a: string]: number; // Number is not a subtype of string. Should error. } @@ -33,8 +41,8 @@ interface H extends G { ~ -!!! Interface 'H' incorrectly extends interface 'G': -!!! Index signatures are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'H' incorrectly extends interface 'G': +!!! error TS2429: Index signatures are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. [a: number]: number; // Should error for the same reason } \ No newline at end of file diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.errors.txt b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.errors.txt index 72b6e60b05f..b1e9ac1b8b4 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.errors.txt +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/detachedCommentAtStartOfFunctionBody1.ts(6,37): error TS2339: Property 'name' does not exist on type 'TestFile'. + + ==== tests/cases/compiler/detachedCommentAtStartOfFunctionBody1.ts (1 errors) ==== class TestFile { foo(message: string): () => string { @@ -6,6 +9,6 @@ /// return () => message + this.name; ~~~~ -!!! Property 'name' does not exist on type 'TestFile'. +!!! error TS2339: Property 'name' does not exist on type 'TestFile'. } } \ No newline at end of file diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.errors.txt b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.errors.txt index 1afac3232e3..fd243e5d8ed 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.errors.txt +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/detachedCommentAtStartOfFunctionBody2.ts(7,37): error TS2339: Property 'name' does not exist on type 'TestFile'. + + ==== tests/cases/compiler/detachedCommentAtStartOfFunctionBody2.ts (1 errors) ==== class TestFile { foo(message: string): () => string { @@ -7,6 +10,6 @@ return () => message + this.name; ~~~~ -!!! Property 'name' does not exist on type 'TestFile'. +!!! error TS2339: Property 'name' does not exist on type 'TestFile'. } } \ No newline at end of file diff --git a/tests/baselines/reference/directReferenceToNull.errors.txt b/tests/baselines/reference/directReferenceToNull.errors.txt index 23a280fc2ed..a39f7b76d2f 100644 --- a/tests/baselines/reference/directReferenceToNull.errors.txt +++ b/tests/baselines/reference/directReferenceToNull.errors.txt @@ -1,4 +1,7 @@ +tests/cases/conformance/types/primitives/null/directReferenceToNull.ts(1,8): error TS2304: Cannot find name 'Null'. + + ==== tests/cases/conformance/types/primitives/null/directReferenceToNull.ts (1 errors) ==== var x: Null; ~~~~ -!!! Cannot find name 'Null'. \ No newline at end of file +!!! error TS2304: Cannot find name 'Null'. \ No newline at end of file diff --git a/tests/baselines/reference/directReferenceToUndefined.errors.txt b/tests/baselines/reference/directReferenceToUndefined.errors.txt index 1534b27e02c..12465a01bdf 100644 --- a/tests/baselines/reference/directReferenceToUndefined.errors.txt +++ b/tests/baselines/reference/directReferenceToUndefined.errors.txt @@ -1,5 +1,8 @@ +tests/cases/conformance/types/primitives/undefined/directReferenceToUndefined.ts(1,8): error TS2304: Cannot find name 'Undefined'. + + ==== tests/cases/conformance/types/primitives/undefined/directReferenceToUndefined.ts (1 errors) ==== var x: Undefined; ~~~~~~~~~ -!!! Cannot find name 'Undefined'. +!!! error TS2304: Cannot find name 'Undefined'. var y = undefined; \ No newline at end of file diff --git a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt index fdf27296612..6e9247d5c45 100644 --- a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt +++ b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt @@ -1,16 +1,24 @@ +tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,5): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,6): error TS1005: '(' expected. +tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,6): error TS1139: Type parameter declaration expected. +tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(4,1): error TS1109: Expression expected. +tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(1,5): error TS2322: Type 'number' is not assignable to type '{ <>(): any; x: number; }': + Property 'x' is missing in type 'Number'. + + ==== tests/cases/compiler/dontShowCompilerGeneratedMembers.ts (5 errors) ==== var f: { ~ -!!! Type 'number' is not assignable to type '{ <>(): any; x: number; }': -!!! Property 'x' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ <>(): any; x: number; }': +!!! error TS2322: Property 'x' is missing in type 'Number'. x: number; <- ~ -!!! Type parameter list cannot be empty. +!!! error TS1098: Type parameter list cannot be empty. ~ -!!! '(' expected. +!!! error TS1005: '(' expected. ~ -!!! Type parameter declaration expected. +!!! error TS1139: Type parameter declaration expected. }; ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/dottedModuleName.errors.txt b/tests/baselines/reference/dottedModuleName.errors.txt index 7308aa980f7..0b8c3a5c422 100644 --- a/tests/baselines/reference/dottedModuleName.errors.txt +++ b/tests/baselines/reference/dottedModuleName.errors.txt @@ -1,13 +1,18 @@ +tests/cases/compiler/dottedModuleName.ts(3,29): error TS1144: Block or ';' expected. +tests/cases/compiler/dottedModuleName.ts(3,18): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/dottedModuleName.ts(3,33): error TS2304: Cannot find name 'x'. + + ==== tests/cases/compiler/dottedModuleName.ts (3 errors) ==== module M { export module N { export function f(x:number)=>2*x; ~~ -!!! Block or ';' expected. +!!! error TS1144: Block or ';' expected. ~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. export module X.Y.Z { export var v2=f(v); } diff --git a/tests/baselines/reference/duplicateClassElements.errors.txt b/tests/baselines/reference/duplicateClassElements.errors.txt index 7822af473ec..9ff44679e44 100644 --- a/tests/baselines/reference/duplicateClassElements.errors.txt +++ b/tests/baselines/reference/duplicateClassElements.errors.txt @@ -1,82 +1,102 @@ +tests/cases/compiler/duplicateClassElements.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(29,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(32,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(36,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(39,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateClassElements.ts(3,12): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateClassElements.ts(6,5): error TS2393: Duplicate function implementation. +tests/cases/compiler/duplicateClassElements.ts(9,9): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateClassElements.ts(12,9): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateClassElements.ts(23,9): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/duplicateClassElements.ts(26,9): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate identifier 'z2'. + + ==== tests/cases/compiler/duplicateClassElements.ts (18 errors) ==== class a { public a; public a; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. public b() { } public b() { ~~~~~~~~~~~~ } ~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. public x; get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. return 10; } set x(_x: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "Hello"; } set y(_y: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public z() { } get z() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'z'. +!!! error TS2300: Duplicate identifier 'z'. return "Hello"; } set z(_y: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'z'. +!!! error TS2300: Duplicate identifier 'z'. } get x2() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } set x2(_x: number) { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public x2; ~~ -!!! Duplicate identifier 'x2'. +!!! error TS2300: Duplicate identifier 'x2'. get z2() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "Hello"; } set z2(_y: string) { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public z2() { ~~ -!!! Duplicate identifier 'z2'. +!!! error TS2300: Duplicate identifier 'z2'. } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateExportAssignments.errors.txt b/tests/baselines/reference/duplicateExportAssignments.errors.txt index ebaba363076..0052391f62c 100644 --- a/tests/baselines/reference/duplicateExportAssignments.errors.txt +++ b/tests/baselines/reference/duplicateExportAssignments.errors.txt @@ -1,24 +1,38 @@ +tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(3,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo1.ts(4,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo2.ts(3,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo2.ts(4,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo3.ts(7,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo3.ts(8,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo4.ts(1,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo4.ts(8,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo5.ts(4,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo5.ts(5,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2308: A module cannot have more than one export assignment. + + ==== tests/cases/conformance/externalModules/foo1.ts (3 errors) ==== var x = 10; var y = 20; export = x; ~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. ==== tests/cases/conformance/externalModules/foo2.ts (2 errors) ==== var x = 10; class y {}; export = x; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. ==== tests/cases/conformance/externalModules/foo3.ts (2 errors) ==== module x { @@ -29,15 +43,15 @@ } export = x; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. ==== tests/cases/conformance/externalModules/foo4.ts (2 errors) ==== export = x; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. function x(){ return 42; } @@ -46,7 +60,7 @@ } export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. ==== tests/cases/conformance/externalModules/foo5.ts (3 errors) ==== var x = 5; @@ -54,11 +68,11 @@ var z = {}; export = x; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = z; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt b/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt index f20e5d626eb..08eb464c8ad 100644 --- a/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt +++ b/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt @@ -1,26 +1,32 @@ +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(3,14): error TS2300: Duplicate identifier 'v'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(8,9): error TS2300: Duplicate identifier 'w'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(13,14): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(16,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'. + + ==== tests/cases/compiler/duplicateIdentifierInCatchBlock.ts (4 errors) ==== var v; try { } catch (e) { function v() { } ~ -!!! Duplicate identifier 'v'. +!!! error TS2300: Duplicate identifier 'v'. } function w() { } try { } catch (e) { var w; ~ -!!! Duplicate identifier 'w'. +!!! error TS2300: Duplicate identifier 'w'. } try { } catch (e) { var x; function x() { } // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. function e() { } // error var p: string; var p: number; // error ~ -!!! Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt index fee03fe7807..783504277e0 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(5,18): error TS2300: Duplicate identifier 'I'. +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(12,18): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts (3 errors) ==== module M { export interface I { } @@ -5,7 +10,7 @@ module M { export class I { } // error ~ -!!! Duplicate identifier 'I'. +!!! error TS2300: Duplicate identifier 'I'. } module M { @@ -14,7 +19,7 @@ module M { export class f { } // error ~ -!!! Duplicate identifier 'f'. +!!! error TS2300: Duplicate identifier 'f'. } module M { @@ -45,7 +50,7 @@ module Foo { export var x: number; // error for redeclaring var in a different parent ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } module N { diff --git a/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt b/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt index be2e3d0e6bb..952b9b3bc42 100644 --- a/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt +++ b/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/duplicateInterfaceMembers1.ts(3,4): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/compiler/duplicateInterfaceMembers1.ts (1 errors) ==== interface Bar { x: number; x: number; ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLabel1.errors.txt b/tests/baselines/reference/duplicateLabel1.errors.txt index 7503b9b278f..b34f1f771e0 100644 --- a/tests/baselines/reference/duplicateLabel1.errors.txt +++ b/tests/baselines/reference/duplicateLabel1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/duplicateLabel1.ts(2,1): error TS1114: Duplicate label 'target' + + ==== tests/cases/compiler/duplicateLabel1.ts (1 errors) ==== target: target: ~~~~~~ -!!! Duplicate label 'target' +!!! error TS1114: Duplicate label 'target' while (true) { } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLabel2.errors.txt b/tests/baselines/reference/duplicateLabel2.errors.txt index da40c01d528..307596cf4e8 100644 --- a/tests/baselines/reference/duplicateLabel2.errors.txt +++ b/tests/baselines/reference/duplicateLabel2.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/duplicateLabel2.ts(3,3): error TS1114: Duplicate label 'target' + + ==== tests/cases/compiler/duplicateLabel2.ts (1 errors) ==== target: while (true) { target: ~~~~~~ -!!! Duplicate label 'target' +!!! error TS1114: Duplicate label 'target' while (true) { } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLocalVariable1.errors.txt b/tests/baselines/reference/duplicateLocalVariable1.errors.txt index 3bddf320db1..e4217d4d411 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable1.errors.txt @@ -1,3 +1,6 @@ +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) ==== //import FileManager = require('filemanager'); @@ -185,7 +188,7 @@ var bytes = []; for (var i = 0; i < 14; i++) { ~ -!!! Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. bytes.push(fb.readByte()); } var expected = [0xEF, 0xBB, 0xBF, 0x54, 0xC3, 0xA8, 0xE1, 0xB4, 0xA3, 0xE2, 0x80, 0xA0, 0x0D, 0x0A]; diff --git a/tests/baselines/reference/duplicateLocalVariable2.errors.txt b/tests/baselines/reference/duplicateLocalVariable2.errors.txt index d176a826082..0fbe0018bf8 100644 --- a/tests/baselines/reference/duplicateLocalVariable2.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/duplicateLocalVariable2.ts(27,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/duplicateLocalVariable2.ts (1 errors) ==== export class TestCase { constructor (public name: string, public test: ()=>boolean, public errorMessageRegEx?: string) { @@ -27,7 +30,7 @@ var bytes = []; for (var i = 0; i < 14; i++) { ~ -!!! Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. bytes.push(fb.readByte()); } var expected = [0xEF]; diff --git a/tests/baselines/reference/duplicateLocalVariable3.errors.txt b/tests/baselines/reference/duplicateLocalVariable3.errors.txt index b99d0772292..5dda5872da0 100644 --- a/tests/baselines/reference/duplicateLocalVariable3.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/duplicateLocalVariable3.ts(11,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'string'. + + ==== tests/cases/compiler/duplicateLocalVariable3.ts (1 errors) ==== var x = 1; var x = 2; @@ -11,5 +14,5 @@ var z = 3; var z = ""; ~ -!!! Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLocalVariable4.errors.txt b/tests/baselines/reference/duplicateLocalVariable4.errors.txt index 6038986971f..3209c23e39e 100644 --- a/tests/baselines/reference/duplicateLocalVariable4.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable4.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/duplicateLocalVariable4.ts(6,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. + + ==== tests/cases/compiler/duplicateLocalVariable4.ts (1 errors) ==== enum E{ a @@ -6,4 +9,4 @@ var x = E; var x = E.a; ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateNumericIndexers.errors.txt b/tests/baselines/reference/duplicateNumericIndexers.errors.txt index 74438877558..c4c7883021a 100644 --- a/tests/baselines/reference/duplicateNumericIndexers.errors.txt +++ b/tests/baselines/reference/duplicateNumericIndexers.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/types/members/duplicateNumericIndexers.ts(5,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/members/duplicateNumericIndexers.ts(9,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/members/duplicateNumericIndexers.ts(10,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/members/duplicateNumericIndexers.ts(14,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/members/duplicateNumericIndexers.ts(15,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/members/duplicateNumericIndexers.ts(20,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/members/duplicateNumericIndexers.ts(25,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/members/duplicateNumericIndexers.ts(30,5): error TS2375: Duplicate number index signature. + + ==== tests/cases/conformance/types/members/duplicateNumericIndexers.ts (8 errors) ==== // it is an error to have duplicate index signatures of the same kind in a type @@ -5,46 +15,46 @@ [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface String { [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface Array { [x: number]: T; ~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. [x: number]: T; ~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } class C { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface I { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } var a: { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt b/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt index 51e9bae840b..370a7070505 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt +++ b/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt @@ -1,20 +1,31 @@ +tests/cases/compiler/duplicateObjectLiteralProperty.ts(14,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(4,5): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(5,5): error TS2300: Duplicate identifier '\u0061'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(6,5): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(8,9): error TS2300: Duplicate identifier '"c"'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. + + ==== tests/cases/compiler/duplicateObjectLiteralProperty.ts (9 errors) ==== var x = { a: 1, b: true, // OK a: 56, // Duplicate ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. \u0061: "ss", // Duplicate ~~~~~~ -!!! Duplicate identifier '\u0061'. +!!! error TS2300: Duplicate identifier '\u0061'. a: { ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. c: 1, "c": 56, // Duplicate ~~~ -!!! Duplicate identifier '"c"'. +!!! error TS2300: Duplicate identifier '"c"'. } }; @@ -22,16 +33,16 @@ var y = { get a() { return 0; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set a(v: number) { }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. get a() { return 0; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! An object literal cannot have multiple get/set accessors with the same name. +!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. }; \ No newline at end of file diff --git a/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt b/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt index e184b7761ea..17a55a7876b 100644 --- a/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt +++ b/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/duplicatePropertiesInStrictMode.ts(4,3): error TS1117: An object literal cannot have multiple properties with the same name in strict mode. +tests/cases/compiler/duplicatePropertiesInStrictMode.ts(4,3): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/compiler/duplicatePropertiesInStrictMode.ts (2 errors) ==== "use strict"; var x = { x: 1, x: 2 ~ -!!! An object literal cannot have multiple properties with the same name in strict mode. +!!! error TS1117: An object literal cannot have multiple properties with the same name in strict mode. ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicatePropertyNames.errors.txt b/tests/baselines/reference/duplicatePropertyNames.errors.txt index 6e9f95e0c42..ac21db7830a 100644 --- a/tests/baselines/reference/duplicatePropertyNames.errors.txt +++ b/tests/baselines/reference/duplicatePropertyNames.errors.txt @@ -1,3 +1,15 @@ +tests/cases/conformance/types/members/duplicatePropertyNames.ts(5,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(15,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(20,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(23,5): error TS2393: Duplicate function implementation. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(26,5): error TS2300: Duplicate identifier 'baz'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(31,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(36,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(39,5): error TS2300: Duplicate identifier 'bar'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(44,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2300: Duplicate identifier 'bar'. + + ==== tests/cases/conformance/types/members/duplicatePropertyNames.ts (10 errors) ==== // duplicate property names are an error in all types @@ -5,7 +17,7 @@ foo: string; foo: string; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. } interface String { @@ -17,53 +29,53 @@ foo: T; foo: T; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. } class C { foo: string; foo: string; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. bar(x) { } bar(x) { } ~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. baz = () => { } baz = () => { } ~~~ -!!! Duplicate identifier 'baz'. +!!! error TS2300: Duplicate identifier 'baz'. } interface I { foo: string; foo: string; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. } var a: { foo: string; foo: string; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. bar: () => {}; bar: () => {}; ~~~ -!!! Duplicate identifier 'bar'. +!!! error TS2300: Duplicate identifier 'bar'. } var b = { foo: '', foo: '', ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. bar: () => { }, bar: () => { } ~~~ -!!! Duplicate identifier 'bar'. +!!! error TS2300: Duplicate identifier 'bar'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateStringIndexers.errors.txt b/tests/baselines/reference/duplicateStringIndexers.errors.txt index f4cfe243bd3..9eebe6f7892 100644 --- a/tests/baselines/reference/duplicateStringIndexers.errors.txt +++ b/tests/baselines/reference/duplicateStringIndexers.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/types/members/duplicateStringIndexers.ts(6,9): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/members/duplicateStringIndexers.ts(11,9): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/members/duplicateStringIndexers.ts(16,9): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/members/duplicateStringIndexers.ts(21,9): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/members/duplicateStringIndexers.ts(26,9): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/members/duplicateStringIndexers.ts(31,9): error TS2374: Duplicate string index signature. + + ==== tests/cases/conformance/types/members/duplicateStringIndexers.ts (6 errors) ==== // it is an error to have duplicate index signatures of the same kind in a type @@ -6,42 +14,42 @@ [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface String { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface Array { [x: string]: T; [x: string]: T; ~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } class C { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface I { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } var a: { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt b/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt index 9fdd6668807..9353eb34151 100644 --- a/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt +++ b/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/duplicateStringNamedProperty1.ts(3,5): error TS2300: Duplicate identifier 'artist'. + + ==== tests/cases/compiler/duplicateStringNamedProperty1.ts (1 errors) ==== export interface Album { "artist": string; artist: string; ~~~~~~ -!!! Duplicate identifier 'artist'. +!!! error TS2300: Duplicate identifier 'artist'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt b/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt index a42b1c0b8b1..768e6111b73 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt @@ -1,3 +1,23 @@ +tests/cases/compiler/duplicateSymbolsExportMatching.ts(24,15): error TS2395: Individual declarations in merged declaration I must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(25,22): error TS2395: Individual declarations in merged declaration I must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(26,22): error TS2395: Individual declarations in merged declaration E must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(27,15): error TS2395: Individual declarations in merged declaration E must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(32,12): error TS2395: Individual declarations in merged declaration inst must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(35,19): error TS2395: Individual declarations in merged declaration inst must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(42,9): error TS2395: Individual declarations in merged declaration v must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(43,16): error TS2395: Individual declarations in merged declaration v must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(44,9): error TS2395: Individual declarations in merged declaration w must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(45,16): error TS2395: Individual declarations in merged declaration w must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2395: Individual declarations in merged declaration F must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/duplicateSymbolsExportMatching.ts(52,21): error TS2395: Individual declarations in merged declaration F must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(56,11): error TS2395: Individual declarations in merged declaration C must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(57,12): error TS2395: Individual declarations in merged declaration C must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(58,19): error TS2395: Individual declarations in merged declaration C must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(64,11): error TS2395: Individual declarations in merged declaration D must be all exported or all local. +tests/cases/compiler/duplicateSymbolsExportMatching.ts(65,18): error TS2395: Individual declarations in merged declaration D must be all exported or all local. + + ==== tests/cases/compiler/duplicateSymbolsExportMatching.ts (18 errors) ==== module M { export interface E { } @@ -24,28 +44,28 @@ module N2 { interface I { } ~ -!!! Individual declarations in merged declaration I must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration I must be all exported or all local. export interface I { } // error ~ -!!! Individual declarations in merged declaration I must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration I must be all exported or all local. export interface E { } ~ -!!! Individual declarations in merged declaration E must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration E must be all exported or all local. interface E { } // error ~ -!!! Individual declarations in merged declaration E must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration E must be all exported or all local. } // Should report error only once for instantiated module module M { module inst { ~~~~ -!!! Individual declarations in merged declaration inst must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration inst must be all exported or all local. var t; } export module inst { // one error ~~~~ -!!! Individual declarations in merged declaration inst must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration inst must be all exported or all local. var t; } } @@ -54,41 +74,41 @@ module M2 { var v: string; ~ -!!! Individual declarations in merged declaration v must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration v must be all exported or all local. export var v: string; // one error (visibility) ~ -!!! Individual declarations in merged declaration v must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration v must be all exported or all local. var w: number; ~ -!!! Individual declarations in merged declaration w must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration w must be all exported or all local. export var w: string; // two errors (visibility and type mismatch) ~ -!!! Individual declarations in merged declaration w must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration w must be all exported or all local. } module M { module F { ~ -!!! Individual declarations in merged declaration F must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration F must be all exported or all local. ~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged var t; } export function F() { } // Only one error for duplicate identifier (don't consider visibility) ~ -!!! Individual declarations in merged declaration F must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration F must be all exported or all local. } module M { class C { } ~ -!!! Individual declarations in merged declaration C must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration C must be all exported or all local. module C { } ~ -!!! Individual declarations in merged declaration C must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration C must be all exported or all local. export module C { // Two visibility errors (one for the clodule symbol, and one for the merged container symbol) ~ -!!! Individual declarations in merged declaration C must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration C must be all exported or all local. var t; } } @@ -96,7 +116,7 @@ // Top level interface D { } ~ -!!! Individual declarations in merged declaration D must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration D must be all exported or all local. export interface D { } ~ -!!! Individual declarations in merged declaration D must be all exported or all local. \ No newline at end of file +!!! error TS2395: Individual declarations in merged declaration D must be all exported or all local. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateTypeParameters1.errors.txt b/tests/baselines/reference/duplicateTypeParameters1.errors.txt index 798411f6b6d..ad9edcfaa34 100644 --- a/tests/baselines/reference/duplicateTypeParameters1.errors.txt +++ b/tests/baselines/reference/duplicateTypeParameters1.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/duplicateTypeParameters1.ts(1,15): error TS2300: Duplicate identifier 'X'. + + ==== tests/cases/compiler/duplicateTypeParameters1.ts (1 errors) ==== function A() { } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateTypeParameters2.errors.txt b/tests/baselines/reference/duplicateTypeParameters2.errors.txt index 52c6b799e9e..a509497a0c5 100644 --- a/tests/baselines/reference/duplicateTypeParameters2.errors.txt +++ b/tests/baselines/reference/duplicateTypeParameters2.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/duplicateTypeParameters2.ts(4,26): error TS2300: Duplicate identifier 'T'. + + ==== tests/cases/compiler/duplicateTypeParameters2.ts (1 errors) ==== class A { public foo() { } } class B { public bar() { } } interface I {} ~ -!!! Duplicate identifier 'T'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'T'. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateTypeParameters3.errors.txt b/tests/baselines/reference/duplicateTypeParameters3.errors.txt index 88bbf127abb..9ff7d621948 100644 --- a/tests/baselines/reference/duplicateTypeParameters3.errors.txt +++ b/tests/baselines/reference/duplicateTypeParameters3.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/duplicateTypeParameters3.ts(2,14): error TS2300: Duplicate identifier 'A'. + + ==== tests/cases/compiler/duplicateTypeParameters3.ts (1 errors) ==== interface X { x: () => () => void; ~ -!!! Duplicate identifier 'A'. +!!! error TS2300: Duplicate identifier 'A'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateVarAndImport2.errors.txt b/tests/baselines/reference/duplicateVarAndImport2.errors.txt index b6f52fc23cb..192b16eaab9 100644 --- a/tests/baselines/reference/duplicateVarAndImport2.errors.txt +++ b/tests/baselines/reference/duplicateVarAndImport2.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/duplicateVarAndImport2.ts(4,1): error TS2440: Import declaration conflicts with local declaration of 'a' + + ==== tests/cases/compiler/duplicateVarAndImport2.ts (1 errors) ==== // error since module is instantiated var a; module M { export var x = 1; } import a = M; ~~~~~~~~~~~~~ -!!! Import declaration conflicts with local declaration of 'a' \ No newline at end of file +!!! error TS2440: Import declaration conflicts with local declaration of 'a' \ No newline at end of file diff --git a/tests/baselines/reference/duplicateVariablesWithAny.errors.txt b/tests/baselines/reference/duplicateVariablesWithAny.errors.txt index 0cfc4b1a720..787e118ca37 100644 --- a/tests/baselines/reference/duplicateVariablesWithAny.errors.txt +++ b/tests/baselines/reference/duplicateVariablesWithAny.errors.txt @@ -1,25 +1,31 @@ +tests/cases/compiler/duplicateVariablesWithAny.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. +tests/cases/compiler/duplicateVariablesWithAny.ts(6,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. +tests/cases/compiler/duplicateVariablesWithAny.ts(10,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. +tests/cases/compiler/duplicateVariablesWithAny.ts(13,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. + + ==== tests/cases/compiler/duplicateVariablesWithAny.ts (4 errors) ==== // They should have to be the same even when one of the types is 'any' var x: any; var x = 2; //error ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. var y = ""; var y; //error ~ -!!! Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. module N { var x: any; var x = 2; //error ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. var y = ""; var y; //error ~ -!!! Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. } var z: any; diff --git a/tests/baselines/reference/duplicateVarsAcrossFileBoundaries.errors.txt b/tests/baselines/reference/duplicateVarsAcrossFileBoundaries.errors.txt index 5f9d5727475..d4222483212 100644 --- a/tests/baselines/reference/duplicateVarsAcrossFileBoundaries.errors.txt +++ b/tests/baselines/reference/duplicateVarsAcrossFileBoundaries.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. +tests/cases/compiler/duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. +tests/cases/compiler/duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. +tests/cases/compiler/duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. + + ==== tests/cases/compiler/duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== var x = 3; var y = ""; @@ -5,19 +11,19 @@ ==== tests/cases/compiler/duplicateVarsAcrossFileBoundaries_1.ts (1 errors) ==== var x = true; ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. var z = 3; ==== tests/cases/compiler/duplicateVarsAcrossFileBoundaries_2.ts (3 errors) ==== var x = ""; ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. var y = 3; ~ -!!! Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. var z = false; ~ -!!! Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. ==== tests/cases/compiler/duplicateVarsAcrossFileBoundaries_3.ts (0 errors) ==== var x = 0; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt b/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt index 0df438756cf..7fe090395e3 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt +++ b/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/emitThisInSuperMethodCall.ts(10,17): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +tests/cases/compiler/emitThisInSuperMethodCall.ts(17,17): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +tests/cases/compiler/emitThisInSuperMethodCall.ts(23,13): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class + + ==== tests/cases/compiler/emitThisInSuperMethodCall.ts (3 errors) ==== class User { sayHello() { @@ -10,7 +15,7 @@ function inner() { super.sayHello(); ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } }; } @@ -19,7 +24,7 @@ () => { super.sayHello(); ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } } } @@ -27,7 +32,7 @@ function inner() { super.sayHello(); ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } } } diff --git a/tests/baselines/reference/emptyGenericParamList.errors.txt b/tests/baselines/reference/emptyGenericParamList.errors.txt index 841c41be084..361e5a2fc21 100644 --- a/tests/baselines/reference/emptyGenericParamList.errors.txt +++ b/tests/baselines/reference/emptyGenericParamList.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/emptyGenericParamList.ts(2,9): error TS1099: Type argument list cannot be empty. +tests/cases/compiler/emptyGenericParamList.ts(2,8): error TS2314: Generic type 'I' requires 1 type argument(s). + + ==== tests/cases/compiler/emptyGenericParamList.ts (2 errors) ==== class I {} var x: I<>; ~~ -!!! Type argument list cannot be empty. +!!! error TS1099: Type argument list cannot be empty. ~~~ -!!! Generic type 'I' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'I' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/emptyMemberAccess.errors.txt b/tests/baselines/reference/emptyMemberAccess.errors.txt index 19c24099d94..847e69e4b51 100644 --- a/tests/baselines/reference/emptyMemberAccess.errors.txt +++ b/tests/baselines/reference/emptyMemberAccess.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/emptyMemberAccess.ts(3,5): error TS1109: Expression expected. + + ==== tests/cases/compiler/emptyMemberAccess.ts (1 errors) ==== function getObj() { ().toString(); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/emptyTypeArgumentList.errors.txt b/tests/baselines/reference/emptyTypeArgumentList.errors.txt index e05930401f7..51efea14cb1 100644 --- a/tests/baselines/reference/emptyTypeArgumentList.errors.txt +++ b/tests/baselines/reference/emptyTypeArgumentList.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/emptyTypeArgumentList.ts(2,4): error TS1099: Type argument list cannot be empty. +tests/cases/compiler/emptyTypeArgumentList.ts(2,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/emptyTypeArgumentList.ts (2 errors) ==== function foo() { } foo<>(); ~~ -!!! Type argument list cannot be empty. +!!! error TS1099: Type argument list cannot be empty. ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/emptyTypeArgumentListWithNew.errors.txt b/tests/baselines/reference/emptyTypeArgumentListWithNew.errors.txt index aad58ddfdce..538d0abb264 100644 --- a/tests/baselines/reference/emptyTypeArgumentListWithNew.errors.txt +++ b/tests/baselines/reference/emptyTypeArgumentListWithNew.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/emptyTypeArgumentListWithNew.ts(2,8): error TS1099: Type argument list cannot be empty. +tests/cases/compiler/emptyTypeArgumentListWithNew.ts(2,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/emptyTypeArgumentListWithNew.ts (2 errors) ==== class foo { } new foo<>(); ~~ -!!! Type argument list cannot be empty. +!!! error TS1099: Type argument list cannot be empty. ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignability.errors.txt b/tests/baselines/reference/enumAssignability.errors.txt index 3a581b3cd1a..018cd119b05 100644 --- a/tests/baselines/reference/enumAssignability.errors.txt +++ b/tests/baselines/reference/enumAssignability.errors.txt @@ -1,3 +1,33 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(9,1): error TS2323: Type 'F' is not assignable to type 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(10,1): error TS2323: Type 'E' is not assignable to type 'F'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(29,9): error TS2323: Type 'E' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(30,9): error TS2323: Type 'E' is not assignable to type 'boolean'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(31,9): error TS2322: Type 'E' is not assignable to type 'Date': + Property 'toDateString' is missing in type 'Number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(33,9): error TS2323: Type 'E' is not assignable to type 'void'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(36,9): error TS2323: Type 'E' is not assignable to type '() => {}'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(37,9): error TS2322: Type 'E' is not assignable to type 'Function': + Property 'apply' is missing in type 'Number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(38,9): error TS2323: Type 'E' is not assignable to type '(x: number) => string'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(39,5): error TS2322: Type 'E' is not assignable to type 'C': + Property 'foo' is missing in type 'Number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(40,5): error TS2322: Type 'E' is not assignable to type 'I': + Property 'foo' is missing in type 'Number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(41,9): error TS2322: Type 'E' is not assignable to type 'number[]': + Property 'length' is missing in type 'Number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(42,9): error TS2322: Type 'E' is not assignable to type '{ foo: string; }': + Property 'foo' is missing in type 'Number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(43,9): error TS2323: Type 'E' is not assignable to type '(x: T) => T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(45,9): error TS2322: Type 'E' is not assignable to type 'String': + Property 'charAt' is missing in type 'Number'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(47,21): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(48,9): error TS2323: Type 'E' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(49,9): error TS2323: Type 'E' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(50,9): error TS2323: Type 'E' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(51,13): error TS2323: Type 'E' is not assignable to type 'A'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(52,13): error TS2323: Type 'E' is not assignable to type 'B'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts (21 errors) ==== // enums assignable to number, any, Object, errors unless otherwise noted @@ -9,10 +39,10 @@ e = f; ~ -!!! Type 'F' is not assignable to type 'E'. +!!! error TS2323: Type 'F' is not assignable to type 'E'. f = e; ~ -!!! Type 'E' is not assignable to type 'F'. +!!! error TS2323: Type 'E' is not assignable to type 'F'. e = 1; // ok f = 1; // ok var x: number = e; // ok @@ -33,72 +63,72 @@ var b: number = e; // ok var c: string = e; ~ -!!! Type 'E' is not assignable to type 'string'. +!!! error TS2323: Type 'E' is not assignable to type 'string'. var d: boolean = e; ~ -!!! Type 'E' is not assignable to type 'boolean'. +!!! error TS2323: Type 'E' is not assignable to type 'boolean'. var ee: Date = e; ~~ -!!! Type 'E' is not assignable to type 'Date': -!!! Property 'toDateString' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'Date': +!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var f: any = e; // ok var g: void = e; ~ -!!! Type 'E' is not assignable to type 'void'. +!!! error TS2323: Type 'E' is not assignable to type 'void'. var h: Object = e; var i: {} = e; var j: () => {} = e; ~ -!!! Type 'E' is not assignable to type '() => {}'. +!!! error TS2323: Type 'E' is not assignable to type '() => {}'. var k: Function = e; ~ -!!! Type 'E' is not assignable to type 'Function': -!!! Property 'apply' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'Function': +!!! error TS2322: Property 'apply' is missing in type 'Number'. var l: (x: number) => string = e; ~ -!!! Type 'E' is not assignable to type '(x: number) => string'. +!!! error TS2323: Type 'E' is not assignable to type '(x: number) => string'. ac = e; ~~ -!!! Type 'E' is not assignable to type 'C': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Property 'foo' is missing in type 'Number'. ai = e; ~~ -!!! Type 'E' is not assignable to type 'I': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'I': +!!! error TS2322: Property 'foo' is missing in type 'Number'. var m: number[] = e; ~ -!!! Type 'E' is not assignable to type 'number[]': -!!! Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'number[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. var n: { foo: string } = e; ~ -!!! Type 'E' is not assignable to type '{ foo: string; }': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }': +!!! error TS2322: Property 'foo' is missing in type 'Number'. var o: (x: T) => T = e; ~ -!!! Type 'E' is not assignable to type '(x: T) => T'. +!!! error TS2323: Type 'E' is not assignable to type '(x: T) => T'. var p: Number = e; var q: String = e; ~ -!!! Type 'E' is not assignable to type 'String': -!!! Property 'charAt' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'String': +!!! error TS2322: Property 'charAt' is missing in type 'Number'. function foo(x: T, y: U, z: V) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = e; ~ -!!! Type 'E' is not assignable to type 'T'. +!!! error TS2323: Type 'E' is not assignable to type 'T'. y = e; ~ -!!! Type 'E' is not assignable to type 'U'. +!!! error TS2323: Type 'E' is not assignable to type 'U'. z = e; ~ -!!! Type 'E' is not assignable to type 'V'. +!!! error TS2323: Type 'E' is not assignable to type 'V'. var a: A = e; ~ -!!! Type 'E' is not assignable to type 'A'. +!!! error TS2323: Type 'E' is not assignable to type 'A'. var b: B = e; ~ -!!! Type 'E' is not assignable to type 'B'. +!!! error TS2323: Type 'E' is not assignable to type 'B'. } } \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.errors.txt b/tests/baselines/reference/enumAssignabilityInInheritance.errors.txt index de9232d72b1..e7c1297e1fd 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/enumAssignabilityInInheritance.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignabilityInInheritance.ts(104,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignabilityInInheritance.ts(109,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignabilityInInheritance.ts (2 errors) ==== // enum is only a subtype of number, no types are subtypes of enum, all of these except the first are errors @@ -104,11 +108,11 @@ var r4 = foo16(E.A); ~~ -!!! Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. declare function foo17(x: {}): {}; declare function foo17(x: E): E; var r4 = foo16(E.A); ~~ -!!! Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignmentCompat.errors.txt b/tests/baselines/reference/enumAssignmentCompat.errors.txt index 7e4c97231e9..4048ac104c6 100644 --- a/tests/baselines/reference/enumAssignmentCompat.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat.errors.txt @@ -1,3 +1,12 @@ +tests/cases/compiler/enumAssignmentCompat.ts(26,5): error TS2323: Type 'typeof W' is not assignable to type 'number'. +tests/cases/compiler/enumAssignmentCompat.ts(28,5): error TS2322: Type 'W' is not assignable to type 'typeof W': + Property 'D' is missing in type 'Number'. +tests/cases/compiler/enumAssignmentCompat.ts(30,5): error TS2323: Type 'number' is not assignable to type 'typeof W'. +tests/cases/compiler/enumAssignmentCompat.ts(32,5): error TS2322: Type 'W' is not assignable to type 'WStatic': + Property 'a' is missing in type 'Number'. +tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2323: Type 'number' is not assignable to type 'WStatic'. + + ==== tests/cases/compiler/enumAssignmentCompat.ts (5 errors) ==== module W { export class D { } @@ -26,24 +35,24 @@ var y: typeof W = W; var z: number = W; // error ~ -!!! Type 'typeof W' is not assignable to type 'number'. +!!! error TS2323: Type 'typeof W' is not assignable to type 'number'. var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! Type 'W' is not assignable to type 'typeof W': -!!! Property 'D' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'typeof W': +!!! error TS2322: Property 'D' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ -!!! Type 'number' is not assignable to type 'typeof W'. +!!! error TS2323: Type 'number' is not assignable to type 'typeof W'. var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! Type 'W' is not assignable to type 'WStatic': -!!! Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'WStatic': +!!! error TS2322: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ -!!! Type 'number' is not assignable to type 'WStatic'. +!!! error TS2323: Type 'number' is not assignable to type 'WStatic'. var h: W = 3; var i: W = W.a; i = W.a; diff --git a/tests/baselines/reference/enumAssignmentCompat2.errors.txt b/tests/baselines/reference/enumAssignmentCompat2.errors.txt index 62d4ef0d04f..52890bcecc7 100644 --- a/tests/baselines/reference/enumAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat2.errors.txt @@ -1,3 +1,12 @@ +tests/cases/compiler/enumAssignmentCompat2.ts(25,5): error TS2323: Type 'typeof W' is not assignable to type 'number'. +tests/cases/compiler/enumAssignmentCompat2.ts(27,5): error TS2322: Type 'W' is not assignable to type 'typeof W': + Property 'a' is missing in type 'Number'. +tests/cases/compiler/enumAssignmentCompat2.ts(29,5): error TS2323: Type 'number' is not assignable to type 'typeof W'. +tests/cases/compiler/enumAssignmentCompat2.ts(31,5): error TS2322: Type 'W' is not assignable to type 'WStatic': + Property 'a' is missing in type 'Number'. +tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2323: Type 'number' is not assignable to type 'WStatic'. + + ==== tests/cases/compiler/enumAssignmentCompat2.ts (5 errors) ==== enum W { @@ -25,24 +34,24 @@ var y: typeof W = W; var z: number = W; // error ~ -!!! Type 'typeof W' is not assignable to type 'number'. +!!! error TS2323: Type 'typeof W' is not assignable to type 'number'. var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! Type 'W' is not assignable to type 'typeof W': -!!! Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'typeof W': +!!! error TS2322: Property 'a' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ -!!! Type 'number' is not assignable to type 'typeof W'. +!!! error TS2323: Type 'number' is not assignable to type 'typeof W'. var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! Type 'W' is not assignable to type 'WStatic': -!!! Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'WStatic': +!!! error TS2322: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ -!!! Type 'number' is not assignable to type 'WStatic'. +!!! error TS2323: Type 'number' is not assignable to type 'WStatic'. var h: W = 3; var i: W = W.a; i = W.a; diff --git a/tests/baselines/reference/enumBasics1.errors.txt b/tests/baselines/reference/enumBasics1.errors.txt index 6d9229341e2..fddca60bd99 100644 --- a/tests/baselines/reference/enumBasics1.errors.txt +++ b/tests/baselines/reference/enumBasics1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/enumBasics1.ts(26,5): error TS2339: Property 'A' does not exist on type 'E'. +tests/cases/compiler/enumBasics1.ts(35,2): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + ==== tests/cases/compiler/enumBasics1.ts (2 errors) ==== enum E { A = 1, @@ -26,7 +30,7 @@ */ E.A.A; // should error ~ -!!! Property 'A' does not exist on type 'E'. +!!! error TS2339: Property 'A' does not exist on type 'E'. enum E2 { @@ -37,6 +41,6 @@ enum E2 { // should error for continued autonumbering C, ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. D, } \ No newline at end of file diff --git a/tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt b/tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt index 7fb893354a9..0bdb52e52c0 100644 --- a/tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt +++ b/tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/enumConflictsWithGlobalIdentifier.ts(5,5): error TS1005: ',' expected. +tests/cases/compiler/enumConflictsWithGlobalIdentifier.ts(4,9): error TS2304: Cannot find name 'IgnoreRulesSpecific'. + + ==== tests/cases/compiler/enumConflictsWithGlobalIdentifier.ts (2 errors) ==== enum Position { IgnoreRulesSpecific = 0, } var x = IgnoreRulesSpecific. ~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'IgnoreRulesSpecific'. +!!! error TS2304: Cannot find name 'IgnoreRulesSpecific'. var y = Position.IgnoreRulesSpecific; ~ -!!! ',' expected. +!!! error TS1005: ',' expected. \ No newline at end of file diff --git a/tests/baselines/reference/enumConstantMembers.errors.txt b/tests/baselines/reference/enumConstantMembers.errors.txt index ac77e2b7b4e..d425b7a6f4b 100644 --- a/tests/baselines/reference/enumConstantMembers.errors.txt +++ b/tests/baselines/reference/enumConstantMembers.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/enums/enumConstantMembers.ts(12,5): error TS1061: Enum member must have initializer. +tests/cases/conformance/enums/enumConstantMembers.ts(18,5): error TS1066: Ambient enum elements can only have integer literal initializers. + + ==== tests/cases/conformance/enums/enumConstantMembers.ts (2 errors) ==== // Constant members allow negatives, but not decimals. Also hex literals are allowed enum E1 { @@ -12,7 +16,7 @@ a = 0.1, b // Error because 0.1 is not a constant ~ -!!! Enum member must have initializer. +!!! error TS1061: Enum member must have initializer. } declare enum E4 { @@ -20,5 +24,5 @@ b = -1, c = 0.1 // Not a constant ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. } \ No newline at end of file diff --git a/tests/baselines/reference/enumErrors.errors.txt b/tests/baselines/reference/enumErrors.errors.txt index 69993d81099..4f930ef2ab9 100644 --- a/tests/baselines/reference/enumErrors.errors.txt +++ b/tests/baselines/reference/enumErrors.errors.txt @@ -1,23 +1,36 @@ +tests/cases/conformance/enums/enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any' +tests/cases/conformance/enums/enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number' +tests/cases/conformance/enums/enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string' +tests/cases/conformance/enums/enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean' +tests/cases/conformance/enums/enumErrors.ts(9,9): error TS2323: Type 'Number' is not assignable to type 'E5'. +tests/cases/conformance/enums/enumErrors.ts(20,9): error TS2323: Type 'E9' is not assignable to type 'E10'. +tests/cases/conformance/enums/enumErrors.ts(21,9): error TS2323: Type 'E9' is not assignable to type 'E10'. +tests/cases/conformance/enums/enumErrors.ts(26,9): error TS2323: Type 'string' is not assignable to type 'E11'. +tests/cases/conformance/enums/enumErrors.ts(27,9): error TS2323: Type 'Date' is not assignable to type 'E11'. +tests/cases/conformance/enums/enumErrors.ts(28,9): error TS2304: Cannot find name 'window'. +tests/cases/conformance/enums/enumErrors.ts(29,9): error TS2323: Type '{}' is not assignable to type 'E11'. + + ==== tests/cases/conformance/enums/enumErrors.ts (11 errors) ==== // Enum named with PredefinedTypes enum any { } ~~~ -!!! Enum name cannot be 'any' +!!! error TS2431: Enum name cannot be 'any' enum number { } ~~~~~~ -!!! Enum name cannot be 'number' +!!! error TS2431: Enum name cannot be 'number' enum string { } ~~~~~~ -!!! Enum name cannot be 'string' +!!! error TS2431: Enum name cannot be 'string' enum boolean { } ~~~~~~~ -!!! Enum name cannot be 'boolean' +!!! error TS2431: Enum name cannot be 'boolean' // Enum with computed member initializer of type Number enum E5 { C = new Number(30) ~~~~~~~~~~~~~~ -!!! Type 'Number' is not assignable to type 'E5'. +!!! error TS2323: Type 'Number' is not assignable to type 'E5'. } enum E9 { @@ -30,25 +43,25 @@ enum E10 { A = E9.A, ~~~~ -!!! Type 'E9' is not assignable to type 'E10'. +!!! error TS2323: Type 'E9' is not assignable to type 'E10'. B = E9.B ~~~~ -!!! Type 'E9' is not assignable to type 'E10'. +!!! error TS2323: Type 'E9' is not assignable to type 'E10'. } // Enum with computed member intializer of other types enum E11 { A = '', ~~ -!!! Type 'string' is not assignable to type 'E11'. +!!! error TS2323: Type 'string' is not assignable to type 'E11'. B = new Date(), ~~~~~~~~~~ -!!! Type 'Date' is not assignable to type 'E11'. +!!! error TS2323: Type 'Date' is not assignable to type 'E11'. C = window, ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. D = {} ~~ -!!! Type '{}' is not assignable to type 'E11'. +!!! error TS2323: Type '{}' is not assignable to type 'E11'. } \ No newline at end of file diff --git a/tests/baselines/reference/enumGenericTypeClash.errors.txt b/tests/baselines/reference/enumGenericTypeClash.errors.txt index df7f1d77ed0..adf345870de 100644 --- a/tests/baselines/reference/enumGenericTypeClash.errors.txt +++ b/tests/baselines/reference/enumGenericTypeClash.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/enumGenericTypeClash.ts(2,6): error TS2300: Duplicate identifier 'X'. + + ==== tests/cases/compiler/enumGenericTypeClash.ts (1 errors) ==== class X { } enum X { MyVal } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. \ No newline at end of file diff --git a/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt b/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt index 0ddd45d5ed9..26b5da7d0cf 100644 --- a/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt +++ b/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/enumIdenticalIdentifierValues.ts(3,5): error TS2300: Duplicate identifier '1.0'. + + ==== tests/cases/compiler/enumIdenticalIdentifierValues.ts (1 errors) ==== enum Enum { 1, 1.0 ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. } \ No newline at end of file diff --git a/tests/baselines/reference/enumInitializersWithExponents.errors.txt b/tests/baselines/reference/enumInitializersWithExponents.errors.txt index 60649475f78..c4338cdf78b 100644 --- a/tests/baselines/reference/enumInitializersWithExponents.errors.txt +++ b/tests/baselines/reference/enumInitializersWithExponents.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/enumInitializersWithExponents.ts(5,5): error TS1066: Ambient enum elements can only have integer literal initializers. +tests/cases/compiler/enumInitializersWithExponents.ts(6,5): error TS1066: Ambient enum elements can only have integer literal initializers. + + ==== tests/cases/compiler/enumInitializersWithExponents.ts (2 errors) ==== // Must be integer literals. declare enum E { @@ -5,10 +9,10 @@ b = 1e25, // ok c = 1e-3, // error ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. d = 1e-9, // error ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. e = 1e0, // ok f = 1e+25 // ok } \ No newline at end of file diff --git a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.errors.txt b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.errors.txt index 28798c1e476..e5c341b34df 100644 --- a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.errors.txt +++ b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.errors.txt @@ -1,3 +1,22 @@ +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(18,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'string'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(24,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'boolean'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(30,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'Date'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(36,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'RegExp'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(42,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type '{ bar: number; }'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(48,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'number[]'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(54,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'I8'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(60,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'A'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(66,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'A2'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(72,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type '(x: any) => number'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(78,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type '(x: T) => T'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(85,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'E2'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(95,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'typeof f'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(105,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'typeof c'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(111,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'T'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(115,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'U'. + + ==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts (17 errors) ==== // enums are only subtypes of number, any and no other types @@ -18,7 +37,7 @@ [x: string]: string; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'string'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'string'. } @@ -26,7 +45,7 @@ [x: string]: boolean; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'boolean'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'boolean'. } @@ -34,7 +53,7 @@ [x: string]: Date; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'Date'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'Date'. } @@ -42,7 +61,7 @@ [x: string]: RegExp; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'RegExp'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'RegExp'. } @@ -50,7 +69,7 @@ [x: string]: { bar: number }; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type '{ bar: number; }'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type '{ bar: number; }'. } @@ -58,7 +77,7 @@ [x: string]: number[]; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'number[]'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'number[]'. } @@ -66,7 +85,7 @@ [x: string]: I8; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'I8'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'I8'. } class A { foo: number; } @@ -74,7 +93,7 @@ [x: string]: A; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'A'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'A'. } class A2 { foo: T; } @@ -82,7 +101,7 @@ [x: string]: A2; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'A2'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'A2'. } @@ -90,7 +109,7 @@ [x: string]: (x) => number; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type '(x: any) => number'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type '(x: any) => number'. } @@ -98,7 +117,7 @@ [x: string]: (x: T) => T; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type '(x: T) => T'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type '(x: T) => T'. } @@ -107,7 +126,7 @@ [x: string]: E2; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'E2'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'E2'. } @@ -119,7 +138,7 @@ [x: string]: typeof f; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'typeof f'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'typeof f'. } @@ -131,7 +150,7 @@ [x: string]: typeof c; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'typeof c'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'typeof c'. } @@ -139,17 +158,17 @@ [x: string]: T; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'T'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'T'. } interface I18 { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. [x: string]: U; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'U'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'U'. } diff --git a/tests/baselines/reference/enumMemberResolution.errors.txt b/tests/baselines/reference/enumMemberResolution.errors.txt index 71f6f8e45b5..74fa7aec1e0 100644 --- a/tests/baselines/reference/enumMemberResolution.errors.txt +++ b/tests/baselines/reference/enumMemberResolution.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/enumMemberResolution.ts(5,5): error TS1005: ',' expected. +tests/cases/compiler/enumMemberResolution.ts(4,9): error TS2304: Cannot find name 'IgnoreRulesSpecific'. + + ==== tests/cases/compiler/enumMemberResolution.ts (2 errors) ==== enum Position2 { IgnoreRulesSpecific = 0 } var x = IgnoreRulesSpecific. // error ~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'IgnoreRulesSpecific'. +!!! error TS2304: Cannot find name 'IgnoreRulesSpecific'. var y = 1; ~ -!!! ',' expected. +!!! error TS1005: ',' expected. var z = Position2.IgnoreRulesSpecific; // no error \ No newline at end of file diff --git a/tests/baselines/reference/enumMergingErrors.errors.txt b/tests/baselines/reference/enumMergingErrors.errors.txt index 30cf6ef18cd..08f8d3a2716 100644 --- a/tests/baselines/reference/enumMergingErrors.errors.txt +++ b/tests/baselines/reference/enumMergingErrors.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/enums/enumMergingErrors.ts(26,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +tests/cases/conformance/enums/enumMergingErrors.ts(38,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + ==== tests/cases/conformance/enums/enumMergingErrors.ts (2 errors) ==== // Enum with constant, computed, constant members split across 3 declarations with the same root module module M { @@ -26,7 +30,7 @@ module M1 { export enum E1 { C } ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } @@ -40,7 +44,7 @@ module M2 { export enum E1 { C } ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } diff --git a/tests/baselines/reference/enumPropertyAccess.errors.txt b/tests/baselines/reference/enumPropertyAccess.errors.txt index 6a9886c0968..666e9297120 100644 --- a/tests/baselines/reference/enumPropertyAccess.errors.txt +++ b/tests/baselines/reference/enumPropertyAccess.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/enumPropertyAccess.ts(7,11): error TS2339: Property 'Green' does not exist on type 'Colors'. +tests/cases/compiler/enumPropertyAccess.ts(12,7): error TS2339: Property 'Green' does not exist on type 'B'. + + ==== tests/cases/compiler/enumPropertyAccess.ts (2 errors) ==== enum Colors { Red, @@ -7,13 +11,13 @@ var x = Colors.Red; // type of 'x' should be 'Colors' var p = x.Green; // error ~~~~~ -!!! Property 'Green' does not exist on type 'Colors'. +!!! error TS2339: Property 'Green' does not exist on type 'Colors'. x.toFixed(); // ok // Now with generics function fill(f: B) { f.Green; // error ~~~~~ -!!! Property 'Green' does not exist on type 'B'. +!!! error TS2339: Property 'Green' does not exist on type 'B'. f.toFixed(); // ok } \ No newline at end of file diff --git a/tests/baselines/reference/enumWithParenthesizedInitializer1.errors.txt b/tests/baselines/reference/enumWithParenthesizedInitializer1.errors.txt index 9279067d7fa..b1dca1d501e 100644 --- a/tests/baselines/reference/enumWithParenthesizedInitializer1.errors.txt +++ b/tests/baselines/reference/enumWithParenthesizedInitializer1.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/enumWithParenthesizedInitializer1.ts(3,1): error TS1005: ')' expected. + + ==== tests/cases/compiler/enumWithParenthesizedInitializer1.ts (1 errors) ==== enum E { e = -(3 } ~ -!!! ')' expected. \ No newline at end of file +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/enumWithPrimitiveName.errors.txt b/tests/baselines/reference/enumWithPrimitiveName.errors.txt index 6274cdcd43d..403c0855ebb 100644 --- a/tests/baselines/reference/enumWithPrimitiveName.errors.txt +++ b/tests/baselines/reference/enumWithPrimitiveName.errors.txt @@ -1,10 +1,15 @@ +tests/cases/compiler/enumWithPrimitiveName.ts(1,6): error TS2431: Enum name cannot be 'string' +tests/cases/compiler/enumWithPrimitiveName.ts(2,6): error TS2431: Enum name cannot be 'number' +tests/cases/compiler/enumWithPrimitiveName.ts(3,6): error TS2431: Enum name cannot be 'any' + + ==== tests/cases/compiler/enumWithPrimitiveName.ts (3 errors) ==== enum string { } ~~~~~~ -!!! Enum name cannot be 'string' +!!! error TS2431: Enum name cannot be 'string' enum number { } ~~~~~~ -!!! Enum name cannot be 'number' +!!! error TS2431: Enum name cannot be 'number' enum any { } ~~~ -!!! Enum name cannot be 'any' \ No newline at end of file +!!! error TS2431: Enum name cannot be 'any' \ No newline at end of file diff --git a/tests/baselines/reference/enumWithoutInitializerAfterComputedMember.errors.txt b/tests/baselines/reference/enumWithoutInitializerAfterComputedMember.errors.txt index 571bb6906e5..876c04a0322 100644 --- a/tests/baselines/reference/enumWithoutInitializerAfterComputedMember.errors.txt +++ b/tests/baselines/reference/enumWithoutInitializerAfterComputedMember.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts(4,5): error TS1061: Enum member must have initializer. + + ==== tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts (1 errors) ==== enum E { a, b = a, c ~ -!!! Enum member must have initializer. +!!! error TS1061: Enum member must have initializer. } \ No newline at end of file diff --git a/tests/baselines/reference/enumsWithMultipleDeclarations1.errors.txt b/tests/baselines/reference/enumsWithMultipleDeclarations1.errors.txt index d2336e905c5..7c90dc4eda5 100644 --- a/tests/baselines/reference/enumsWithMultipleDeclarations1.errors.txt +++ b/tests/baselines/reference/enumsWithMultipleDeclarations1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/enumsWithMultipleDeclarations1.ts(6,3): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +tests/cases/compiler/enumsWithMultipleDeclarations1.ts(10,3): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + ==== tests/cases/compiler/enumsWithMultipleDeclarations1.ts (2 errors) ==== enum E { A @@ -6,11 +10,11 @@ enum E { B ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } enum E { C ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } \ No newline at end of file diff --git a/tests/baselines/reference/enumsWithMultipleDeclarations2.errors.txt b/tests/baselines/reference/enumsWithMultipleDeclarations2.errors.txt index ef7040dd946..c072809b5cb 100644 --- a/tests/baselines/reference/enumsWithMultipleDeclarations2.errors.txt +++ b/tests/baselines/reference/enumsWithMultipleDeclarations2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/enumsWithMultipleDeclarations2.ts(10,3): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + ==== tests/cases/compiler/enumsWithMultipleDeclarations2.ts (1 errors) ==== enum E { A @@ -10,5 +13,5 @@ enum E { C ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } \ No newline at end of file diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.errors.txt b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.errors.txt index 4a94b22ee76..f0976ba7398 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.errors.txt +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/errorForwardReferenceForwadingConstructor.ts(4,14): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/errorForwardReferenceForwadingConstructor.ts (1 errors) ==== // Error forward referencing derived class with forwarding constructor function f() { var d1 = new derived(); ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new derived(4); } diff --git a/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt b/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt index a015fc902ab..f385d0afcb3 100644 --- a/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt +++ b/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/errorLocationForInterfaceExtension.ts(3,21): error TS2304: Cannot find name 'string'. + + ==== tests/cases/compiler/errorLocationForInterfaceExtension.ts (1 errors) ==== var n = ''; interface x extends string { } ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt b/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt index 9b19634265d..04b80fb1104 100644 --- a/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt +++ b/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/errorMessageOnObjectLiteralType.ts(5,3): error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'. +tests/cases/compiler/errorMessageOnObjectLiteralType.ts(6,8): error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }'. + + ==== tests/cases/compiler/errorMessageOnObjectLiteralType.ts (2 errors) ==== var x: { a: string; @@ -5,7 +9,7 @@ }; x.getOwnPropertyNamess(); ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'. +!!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'. Object.getOwnPropertyNamess(null); ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'getOwnPropertyNamess' does not exist on type '{ (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }'. \ No newline at end of file +!!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }'. \ No newline at end of file diff --git a/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt b/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt index 414fa7dc4c2..c832230f343 100644 --- a/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt +++ b/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt @@ -1,9 +1,14 @@ +tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(1,5): error TS2322: Type '() => void' is not assignable to type '() => boolean': + Type 'void' is not assignable to type 'boolean'. +tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(2,37): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. + + ==== tests/cases/compiler/errorOnContextuallyTypedReturnType.ts (2 errors) ==== var n1: () => boolean = function () { }; // expect an error here ~~ -!!! Type '() => void' is not assignable to type '() => boolean': -!!! Type 'void' is not assignable to type 'boolean'. +!!! error TS2322: Type '() => void' is not assignable to type '() => boolean': +!!! error TS2322: Type 'void' is not assignable to type 'boolean'. var n2: () => boolean = function ():boolean { }; // expect an error here ~~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. \ No newline at end of file diff --git a/tests/baselines/reference/errorSuperCalls.errors.txt b/tests/baselines/reference/errorSuperCalls.errors.txt index 7e85cc07ee7..4369b4b4ab2 100644 --- a/tests/baselines/reference/errorSuperCalls.errors.txt +++ b/tests/baselines/reference/errorSuperCalls.errors.txt @@ -1,68 +1,90 @@ +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(13,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(17,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(33,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(37,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(46,14): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(66,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(70,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(4,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(9,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(14,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(18,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(22,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(26,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(30,16): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(34,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(38,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(58,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(62,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(67,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(71,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors + + ==== tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts (20 errors) ==== //super call in class constructor with no base type class NoBase { constructor() { super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } //super call in class member function with no base type fn() { super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } //super call in class accessor (get and set) with no base type get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. return null; } set foo(v) { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } //super call in class member initializer with no base type p = super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. //super call in static class member function with no base type static fn() { super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } //super call in static class member initializer with no base type static k = super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. //super call in static class accessor (get and set) with no base type static get q() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. return null; } static set q(n) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } } @@ -72,7 +94,7 @@ constructor() { super(); ~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. super(); } } @@ -86,30 +108,30 @@ //super call in class member initializer of derived type t = super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors fn() { //super call in class member function of derived type super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } //super call in class accessor (get and set) of derived type get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors return null; } set foo(n) { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } } \ No newline at end of file diff --git a/tests/baselines/reference/errorSuperPropertyAccess.errors.txt b/tests/baselines/reference/errorSuperPropertyAccess.errors.txt index 9833e64eba5..eba9953c34c 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.errors.txt +++ b/tests/baselines/reference/errorSuperPropertyAccess.errors.txt @@ -1,3 +1,43 @@ +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(24,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(29,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(64,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(68,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(94,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(98,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(113,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(119,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(6,17): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(7,17): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(11,17): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(12,17): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(15,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(16,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(21,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(25,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(30,9): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(57,15): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(61,23): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(65,23): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(69,19): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(73,13): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(76,40): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(87,15): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(91,23): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(95,23): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(99,19): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(109,15): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(110,15): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(111,9): error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(114,15): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(115,15): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(116,9): error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(120,15): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(121,15): error TS2340: Only public methods of the base class are accessible via the 'super' keyword +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(122,9): error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(127,16): error TS2335: 'super' can only be referenced in a derived class. +tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(127,30): error TS2335: 'super' can only be referenced in a derived class. + + ==== tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts (38 errors) ==== //super property access in constructor of class with no base type //super property access in instance member function of class with no base type @@ -6,51 +46,51 @@ constructor() { var a = super.prototype; ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. var b = super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } fn() { var a = super.prototype; ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. var b = super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } m = super.prototype; ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. n = super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. //super static property access in static member function of class with no base type //super static property access in static member accessor(get and set) of class with no base type public static static1() { super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } public static get static2() { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. return ''; } public static set static2(n) { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } } @@ -79,40 +119,40 @@ super(); super.publicMember = 1; ~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } fn() { var x = super.publicMember; ~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } get a() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = super.publicMember; ~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword return undefined; } set a(n) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. n = super.publicMember; ~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } fn2() { function inner() { super.publicFunc(); ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } var x = { test: function () { return super.publicFunc(); } ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } } } @@ -125,29 +165,29 @@ super(); super.privateMember = 1; ~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } fn() { var x = super.privateMember; ~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } get a() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = super.privateMember; ~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword return undefined; } set a(n) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. n = super.privateMember; ~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } } @@ -159,47 +199,47 @@ static fn() { super.publicStaticMember = 3; ~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticMember = 3; ~~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticFunc(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'SomeBase.privateStaticFunc' is inaccessible. +!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. } static get a() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.publicStaticMember = 3; ~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticMember = 3; ~~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticFunc(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'SomeBase.privateStaticFunc' is inaccessible. +!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. return ''; } static set a(n) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.publicStaticMember = 3; ~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticMember = 3; ~~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticFunc(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'SomeBase.privateStaticFunc' is inaccessible. +!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. } } // In object literal var obj = { n: super.wat, p: super.foo() }; ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. \ No newline at end of file diff --git a/tests/baselines/reference/errorSupression1.errors.txt b/tests/baselines/reference/errorSupression1.errors.txt index f702ea6e643..206a78ebf45 100644 --- a/tests/baselines/reference/errorSupression1.errors.txt +++ b/tests/baselines/reference/errorSupression1.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/errorSupression1.ts(4,15): error TS2339: Property 'b' does not exist on type 'typeof Foo'. + + ==== tests/cases/compiler/errorSupression1.ts (1 errors) ==== class Foo { static bar() { return "x"; } } var baz = Foo.b; ~ -!!! Property 'b' does not exist on type 'typeof Foo'. +!!! error TS2339: Property 'b' does not exist on type 'typeof Foo'. // Foo.b won't bind. baz.concat("y"); diff --git a/tests/baselines/reference/errorTypesAsTypeArguments.errors.txt b/tests/baselines/reference/errorTypesAsTypeArguments.errors.txt index 90c3f43dc4e..44f95ca29e6 100644 --- a/tests/baselines/reference/errorTypesAsTypeArguments.errors.txt +++ b/tests/baselines/reference/errorTypesAsTypeArguments.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/errorTypesAsTypeArguments.ts(2,16): error TS2304: Cannot find name 'B'. +tests/cases/compiler/errorTypesAsTypeArguments.ts(2,25): error TS2304: Cannot find name 'C'. + + ==== tests/cases/compiler/errorTypesAsTypeArguments.ts (2 errors) ==== interface Foo { bar(baz: Foo): Foo; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. ~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. } \ No newline at end of file diff --git a/tests/baselines/reference/errorWithTruncatedType.errors.txt b/tests/baselines/reference/errorWithTruncatedType.errors.txt index 7d3cab5f3c5..f16dce347a5 100644 --- a/tests/baselines/reference/errorWithTruncatedType.errors.txt +++ b/tests/baselines/reference/errorWithTruncatedType.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/errorWithTruncatedType.ts(11,5): error TS2323: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. + + ==== tests/cases/compiler/errorWithTruncatedType.ts (1 errors) ==== var x: { @@ -11,5 +14,5 @@ // String representation of type of 'x' should be truncated in error message var s: string = x; ~ -!!! Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. +!!! error TS2323: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/errorsInGenericTypeReference.errors.txt b/tests/baselines/reference/errorsInGenericTypeReference.errors.txt index 0dc6b5a0ab0..dcb5018f035 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.errors.txt +++ b/tests/baselines/reference/errorsInGenericTypeReference.errors.txt @@ -1,3 +1,27 @@ +tests/cases/compiler/errorsInGenericTypeReference.ts(25,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/errorsInGenericTypeReference.ts(12,17): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(18,31): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(23,29): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(24,36): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(25,27): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(26,24): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(31,36): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(35,36): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(39,17): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(43,33): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(45,41): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(48,27): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(52,25): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(57,35): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(61,39): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(66,22): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(66,38): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(67,27): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(68,24): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(68,40): error TS2304: Cannot find name 'V'. +tests/cases/compiler/errorsInGenericTypeReference.ts(69,24): error TS2304: Cannot find name 'V'. + + ==== tests/cases/compiler/errorsInGenericTypeReference.ts (22 errors) ==== interface IFoo { } @@ -12,7 +36,7 @@ var tc1 = new testClass1(); tc1.method<{ x: V }>(); // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in constructor type arguments @@ -20,98 +44,98 @@ } var tc2 = new testClass2<{ x: V }>(); // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in method return type annotation class testClass3 { testMethod1(): Foo<{ x: V }> { return null; } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. static testMethod2(): Foo<{ x: V }> { return null } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. set a(value: Foo<{ x: V }>) { } // error: could not find symbol V ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. property: Foo<{ x: V }>; // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. } // in function return type annotation function testFunction1(): Foo<{ x: V }> { return null; } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in paramter types function testFunction2(p: Foo<{ x: V }>) { }// error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in var type annotation var f: Foo<{ x: V }>; // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in constraints class testClass4 { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. interface testClass5> { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. class testClass6 { method(): void { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. } interface testInterface1 { new (a: M); // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. } // in extends clause class testClass7 extends Foo<{ x: V }> { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in implements clause class testClass8 implements IFoo<{ x: V }> { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in signatures interface testInterface2 { new (a: Foo<{ x: V }>): Foo<{ x: V }>; //2x: error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. [x: string]: Foo<{ x: V }>; // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. method(a: Foo<{ x: V }>): Foo<{ x: V }>; //2x: error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. property: Foo<{ x: V }>; // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. } \ No newline at end of file diff --git a/tests/baselines/reference/errorsOnImportedSymbol.errors.txt b/tests/baselines/reference/errorsOnImportedSymbol.errors.txt index 9261bab93fc..ec108d48881 100644 --- a/tests/baselines/reference/errorsOnImportedSymbol.errors.txt +++ b/tests/baselines/reference/errorsOnImportedSymbol.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/errorsOnImportedSymbol_1.ts(2,13): error TS2304: Cannot find name 'Sammy'. +tests/cases/compiler/errorsOnImportedSymbol_1.ts(3,9): error TS2304: Cannot find name 'Sammy'. + + ==== tests/cases/compiler/errorsOnImportedSymbol_1.ts (2 errors) ==== import Sammy = require("errorsOnImportedSymbol_0"); var x = new Sammy.Sammy(); ~~~~~ -!!! Cannot find name 'Sammy'. +!!! error TS2304: Cannot find name 'Sammy'. var y = Sammy.Sammy(); ~~~~~ -!!! Cannot find name 'Sammy'. +!!! error TS2304: Cannot find name 'Sammy'. ==== tests/cases/compiler/errorsOnImportedSymbol_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/es6ClassTest.errors.txt b/tests/baselines/reference/es6ClassTest.errors.txt index 717089ddeb9..4478fbe8156 100644 --- a/tests/baselines/reference/es6ClassTest.errors.txt +++ b/tests/baselines/reference/es6ClassTest.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/es6ClassTest.ts(25,44): error TS1015: Parameter cannot have question mark and initializer. + + ==== tests/cases/compiler/es6ClassTest.ts (1 errors) ==== class Bar { public goo: number; @@ -25,7 +28,7 @@ constructor(); constructor(x?, private y?:string, public z?=0) { ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. super(x); this.x = x; this.gar = 5; diff --git a/tests/baselines/reference/es6ClassTest2.errors.txt b/tests/baselines/reference/es6ClassTest2.errors.txt index 3e3fa2bbee6..bf87a809b77 100644 --- a/tests/baselines/reference/es6ClassTest2.errors.txt +++ b/tests/baselines/reference/es6ClassTest2.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/es6ClassTest2.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/es6ClassTest2.ts(35,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/es6ClassTest2.ts(17,1): error TS2304: Cannot find name 'console'. + + ==== tests/cases/compiler/es6ClassTest2.ts (3 errors) ==== class BasicMonster { constructor(public name: string, public health: number) { @@ -17,7 +22,7 @@ m1.health = 0; console.log((m5.isAlive).toString()); ~~~~~~~ -!!! Cannot find name 'console'. +!!! error TS2304: Cannot find name 'console'. class GetSetMonster { constructor(public name: string, private _health: number) { @@ -32,14 +37,14 @@ // defines one in an object literal. get isAlive() { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this._health > 0; } // Likewise, "set" can be used to define setters. set health(value: number) { ~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. if (value < 0) { throw new Error('Health must be non-negative.') } diff --git a/tests/baselines/reference/es6ClassTest3.errors.txt b/tests/baselines/reference/es6ClassTest3.errors.txt index d666351dc9a..5eb310f338d 100644 --- a/tests/baselines/reference/es6ClassTest3.errors.txt +++ b/tests/baselines/reference/es6ClassTest3.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/es6ClassTest3.ts(3,22): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/compiler/es6ClassTest3.ts(4,23): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + + ==== tests/cases/compiler/es6ClassTest3.ts (2 errors) ==== module M { class Visibility { public foo() { }; ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. private bar() { }; ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. private x: number; public y: number; public z: number; diff --git a/tests/baselines/reference/es6ClassTest9.errors.txt b/tests/baselines/reference/es6ClassTest9.errors.txt index 1b8be82fc9d..3cd59059f89 100644 --- a/tests/baselines/reference/es6ClassTest9.errors.txt +++ b/tests/baselines/reference/es6ClassTest9.errors.txt @@ -1,10 +1,15 @@ +tests/cases/compiler/es6ClassTest9.ts(1,18): error TS1005: '{' expected. +tests/cases/compiler/es6ClassTest9.ts(1,19): error TS1109: Expression expected. +tests/cases/compiler/es6ClassTest9.ts(2,10): error TS2300: Duplicate identifier 'foo'. + + ==== tests/cases/compiler/es6ClassTest9.ts (3 errors) ==== declare class foo(); ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. function foo() {} ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/es6DeclOrdering.errors.txt b/tests/baselines/reference/es6DeclOrdering.errors.txt index 4d890d04238..fdcc796566a 100644 --- a/tests/baselines/reference/es6DeclOrdering.errors.txt +++ b/tests/baselines/reference/es6DeclOrdering.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/es6DeclOrdering.ts(6,20): error TS2339: Property '_store' does not exist on type 'Bar'. +tests/cases/compiler/es6DeclOrdering.ts(11,13): error TS2339: Property '_store' does not exist on type 'Bar'. + + ==== tests/cases/compiler/es6DeclOrdering.ts (2 errors) ==== class Bar { @@ -6,14 +10,14 @@ public foo() { return this._store.length; ~~~~~~ -!!! Property '_store' does not exist on type 'Bar'. +!!! error TS2339: Property '_store' does not exist on type 'Bar'. } constructor(store: string) { this._store = store; // this is an error for some reason? Unresolved symbol store ~~~~~~ -!!! Property '_store' does not exist on type 'Bar'. +!!! error TS2339: Property '_store' does not exist on type 'Bar'. } } diff --git a/tests/baselines/reference/es6MemberScoping.errors.txt b/tests/baselines/reference/es6MemberScoping.errors.txt index 37c8eeb0d20..07788a68648 100644 --- a/tests/baselines/reference/es6MemberScoping.errors.txt +++ b/tests/baselines/reference/es6MemberScoping.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/es6MemberScoping.ts(9,21): error TS2304: Cannot find name 'store'. + + ==== tests/cases/compiler/es6MemberScoping.ts (1 errors) ==== @@ -9,7 +12,7 @@ } public _store = store; // should be an error. ~~~~~ -!!! Cannot find name 'store'. +!!! error TS2304: Cannot find name 'store'. } class Foo2 { diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt index 8ff1f410b37..5dbce43970f 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt @@ -1,3 +1,39 @@ +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(34,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(35,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(36,5): error TS2322: Type 'number' is not assignable to type 'Date': + Property 'toDateString' is missing in type 'Number'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(38,5): error TS2323: Type 'number' is not assignable to type 'void'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(40,5): error TS2322: Type 'D<{}>' is not assignable to type 'I': + Property 'id' is missing in type 'D<{}>'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(41,5): error TS2322: Type 'D<{}>' is not assignable to type 'C': + Property 'id' is missing in type 'D<{}>'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(42,5): error TS2322: Type 'C' is not assignable to type 'D': + Property 'source' is missing in type 'C'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(43,5): error TS2322: Type '{ id: string; }' is not assignable to type 'I': + Types of property 'id' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(44,5): error TS2322: Type 'C' is not assignable to type '{ id: string; }': + Types of property 'id' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(46,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number': + Types of parameters 'x' and 'x' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(47,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number': + Types of parameters 'x' and 'x' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(48,5): error TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number': + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(50,5): error TS2322: Type 'typeof N' is not assignable to type 'typeof M': + Types of property 'A' are incompatible: + Type 'typeof A' is not assignable to type 'typeof A': + Type 'A' is not assignable to type 'A': + Property 'name' is missing in type 'A'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2322: Type 'A' is not assignable to type 'A': + Property 'name' is missing in type 'A'. +tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string': + Type 'boolean' is not assignable to type 'string'. + + ==== tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts (15 errors) ==== interface I { id: number; @@ -34,71 +70,71 @@ var aNumber: number = 'this is a string'; ~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. var aString: string = 9.9; ~~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var aDate: Date = 9.9; ~~~~~ -!!! Type 'number' is not assignable to type 'Date': -!!! Property 'toDateString' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Date': +!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var aVoid: void = 9.9; ~~~~~ -!!! Type 'number' is not assignable to type 'void'. +!!! error TS2323: Type 'number' is not assignable to type 'void'. var anInterface: I = new D(); ~~~~~~~~~~~ -!!! Type 'D<{}>' is not assignable to type 'I': -!!! Property 'id' is missing in type 'D<{}>'. +!!! error TS2322: Type 'D<{}>' is not assignable to type 'I': +!!! error TS2322: Property 'id' is missing in type 'D<{}>'. var aClass: C = new D(); ~~~~~~ -!!! Type 'D<{}>' is not assignable to type 'C': -!!! Property 'id' is missing in type 'D<{}>'. +!!! error TS2322: Type 'D<{}>' is not assignable to type 'C': +!!! error TS2322: Property 'id' is missing in type 'D<{}>'. var aGenericClass: D = new C(); ~~~~~~~~~~~~~ -!!! Type 'C' is not assignable to type 'D': -!!! Property 'source' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'D': +!!! error TS2322: Property 'source' is missing in type 'C'. var anObjectLiteral: I = { id: 'a string' }; ~~~~~~~~~~~~~~~ -!!! Type '{ id: string; }' is not assignable to type 'I': -!!! Types of property 'id' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ id: string; }' is not assignable to type 'I': +!!! error TS2322: Types of property 'id' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var anOtherObjectLiteral: { id: string } = new C(); ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'C' is not assignable to type '{ id: string; }': -!!! Types of property 'id' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type '{ id: string; }': +!!! error TS2322: Types of property 'id' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var aFunction: typeof F = F2; ~~~~~~~~~ -!!! Type '(x: number) => boolean' is not assignable to type '(x: string) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var anOtherFunction: (x: string) => number = F2; ~~~~~~~~~~~~~~~ -!!! Type '(x: number) => boolean' is not assignable to type '(x: string) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var aLambda: typeof F = (x) => 'a string'; ~~~~~~~ -!!! Type '(x: string) => string' is not assignable to type '(x: string) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. var aModule: typeof M = N; ~~~~~~~ -!!! Type 'typeof N' is not assignable to type 'typeof M': -!!! Types of property 'A' are incompatible: -!!! Type 'typeof A' is not assignable to type 'typeof A': -!!! Type 'A' is not assignable to type 'A': -!!! Property 'name' is missing in type 'A'. +!!! error TS2322: Type 'typeof N' is not assignable to type 'typeof M': +!!! error TS2322: Types of property 'A' are incompatible: +!!! error TS2322: Type 'typeof A' is not assignable to type 'typeof A': +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Property 'name' is missing in type 'A'. var aClassInModule: M.A = new N.A(); ~~~~~~~~~~~~~~ -!!! Type 'A' is not assignable to type 'A': -!!! Property 'name' is missing in type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Property 'name' is missing in type 'A'. var aFunctionInModule: typeof M.F2 = F2; ~~~~~~~~~~~~~~~~~ -!!! Type '(x: number) => boolean' is not assignable to type '(x: number) => string': -!!! Type 'boolean' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string': +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/exportAlreadySeen.errors.txt b/tests/baselines/reference/exportAlreadySeen.errors.txt index b80498feb5e..eb9f0ce1a95 100644 --- a/tests/baselines/reference/exportAlreadySeen.errors.txt +++ b/tests/baselines/reference/exportAlreadySeen.errors.txt @@ -1,40 +1,52 @@ +tests/cases/compiler/exportAlreadySeen.ts(2,12): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(3,12): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(5,12): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(6,16): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(7,16): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(12,12): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(13,12): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(15,12): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(16,16): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(17,16): error TS1030: 'export' modifier already seen. + + ==== tests/cases/compiler/exportAlreadySeen.ts (10 errors) ==== module M { export export var x = 1; ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export function f() { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export module N { ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export class C { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export interface I { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. } } declare module A { export export var x; ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export function f() ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export module N { ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export class C { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export interface I { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. } } \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignDottedName.errors.txt b/tests/baselines/reference/exportAssignDottedName.errors.txt index 7faf84e114a..264e32c9cad 100644 --- a/tests/baselines/reference/exportAssignDottedName.errors.txt +++ b/tests/baselines/reference/exportAssignDottedName.errors.txt @@ -1,10 +1,15 @@ +tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo2.ts(2,14): error TS1005: ';' expected. +tests/cases/conformance/externalModules/foo2.ts(2,15): error TS2304: Cannot find name 'x'. + + ==== tests/cases/conformance/externalModules/foo2.ts (2 errors) ==== import foo1 = require('./foo1'); export = foo1.x; // Error, export assignment must be identifier only ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. ==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== export function x(){ @@ -13,5 +18,5 @@ ~~~~~~~~~~~~~ } ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt b/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt index b1e124896e7..8aa25aee2ad 100644 --- a/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt +++ b/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/externalModules/foo3.ts (0 errors) ==== import foo2 = require('./foo2'); var x = foo2(); // should be boolean @@ -8,7 +11,7 @@ ~~~~~~~~~~~~~ } ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== import foo1 = require('./foo1'); diff --git a/tests/baselines/reference/exportAssignNonIdentifier.errors.txt b/tests/baselines/reference/exportAssignNonIdentifier.errors.txt index 7487d9547c1..31ca1be2011 100644 --- a/tests/baselines/reference/exportAssignNonIdentifier.errors.txt +++ b/tests/baselines/reference/exportAssignNonIdentifier.errors.txt @@ -1,25 +1,36 @@ +tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(2,10): error TS1003: Identifier expected. +tests/cases/conformance/externalModules/foo2.ts(1,10): error TS1003: Identifier expected. +tests/cases/conformance/externalModules/foo3.ts(1,10): error TS1003: Identifier expected. +tests/cases/conformance/externalModules/foo4.ts(1,10): error TS1003: Identifier expected. +tests/cases/conformance/externalModules/foo6.ts(1,10): error TS1003: Identifier expected. +tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression expected. +tests/cases/conformance/externalModules/foo7.ts(1,15): error TS1005: ';' expected. +tests/cases/conformance/externalModules/foo8.ts(1,10): error TS1003: Identifier expected. + + ==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ==== var x = 10; export = typeof x; // Error ~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ==== tests/cases/conformance/externalModules/foo2.ts (1 errors) ==== export = "sausages"; // Error ~~~~~~~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ==== tests/cases/conformance/externalModules/foo3.ts (1 errors) ==== export = class Foo3 {}; // Error ~~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ==== tests/cases/conformance/externalModules/foo4.ts (1 errors) ==== export = true; // Error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ==== tests/cases/conformance/externalModules/foo5.ts (0 errors) ==== export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript @@ -27,18 +38,18 @@ ==== tests/cases/conformance/externalModules/foo6.ts (2 errors) ==== export = void; // Error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ==== tests/cases/conformance/externalModules/foo7.ts (1 errors) ==== export = Date || String; // Error ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ==== tests/cases/conformance/externalModules/foo8.ts (1 errors) ==== export = null; // Error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignTypes.errors.txt b/tests/baselines/reference/exportAssignTypes.errors.txt index c4dca71333f..c35e7c0b8f6 100644 --- a/tests/baselines/reference/exportAssignTypes.errors.txt +++ b/tests/baselines/reference/exportAssignTypes.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/externalModules/consumer.ts (0 errors) ==== import iString = require('./expString'); var v1: string = iString; @@ -24,7 +27,7 @@ var x = "test"; export = x; ~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/expNumber.ts (0 errors) ==== var x = 42; diff --git a/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt b/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt index ecae497202e..bb228caa0c9 100644 --- a/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt +++ b/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts(10,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts (1 errors) ==== export enum E1 { A,B,C @@ -10,4 +13,4 @@ // Invalid, as there is already an exported member. export = C1; ~~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt index 9b933cc439d..cf63c48925f 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/externalModules/foo_1.ts(2,17): error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'. + + ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require("./foo_0"); var x = new foo(true); // Should error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'. var y = new foo({a: "test", b: 42}); // Should be OK var z: number = y.test.b; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt index 74518bb9c3c..f6736e468f0 100644 --- a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt +++ b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts(3,13): error TS2304: Cannot find name 'Sammy'. +tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts(4,9): error TS2304: Cannot find name 'Sammy'. + + ==== tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts (2 errors) ==== /// import Sammy = require('exportAssignmentOfDeclaredExternalModule_0'); var x = new Sammy(); // error to use as constructor as there is not constructor symbol ~~~~~ -!!! Cannot find name 'Sammy'. +!!! error TS2304: Cannot find name 'Sammy'. var y = Sammy(); // error to use interface name as call target ~~~~~ -!!! Cannot find name 'Sammy'. +!!! error TS2304: Cannot find name 'Sammy'. var z: Sammy; // no error - z is of type interface Sammy from module 'M' var a = new z(); // constructor - no error var b = z(); // call signature - no error diff --git a/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.errors.txt b/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.errors.txt index 2dd71ce0d07..20355aec05c 100644 --- a/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/exportAssignmentWithDeclareAndExportModifiers.ts(2,1): error TS1120: An export assignment cannot have modifiers. +tests/cases/compiler/exportAssignmentWithDeclareAndExportModifiers.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/compiler/exportAssignmentWithDeclareAndExportModifiers.ts (2 errors) ==== var x; export declare export = x; ~~~~~~~~~~~~~~ -!!! An export assignment cannot have modifiers. +!!! error TS1120: An export assignment cannot have modifiers. ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithDeclareModifier.errors.txt b/tests/baselines/reference/exportAssignmentWithDeclareModifier.errors.txt index 27b202ce0c8..1d2f2e265d3 100644 --- a/tests/baselines/reference/exportAssignmentWithDeclareModifier.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithDeclareModifier.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/exportAssignmentWithDeclareModifier.ts(2,1): error TS1120: An export assignment cannot have modifiers. +tests/cases/compiler/exportAssignmentWithDeclareModifier.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/compiler/exportAssignmentWithDeclareModifier.ts (2 errors) ==== var x; declare export = x; ~~~~~~~ -!!! An export assignment cannot have modifiers. +!!! error TS1120: An export assignment cannot have modifiers. ~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithExportModifier.errors.txt b/tests/baselines/reference/exportAssignmentWithExportModifier.errors.txt index dc3d6cb4cc5..e19ce5bc856 100644 --- a/tests/baselines/reference/exportAssignmentWithExportModifier.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithExportModifier.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/exportAssignmentWithExportModifier.ts(2,1): error TS1120: An export assignment cannot have modifiers. +tests/cases/compiler/exportAssignmentWithExportModifier.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/compiler/exportAssignmentWithExportModifier.ts (2 errors) ==== var x; export export = x; ~~~~~~ -!!! An export assignment cannot have modifiers. +!!! error TS1120: An export assignment cannot have modifiers. ~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithExports.errors.txt b/tests/baselines/reference/exportAssignmentWithExports.errors.txt index 7ddda9db538..d47cbae3221 100644 --- a/tests/baselines/reference/exportAssignmentWithExports.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithExports.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/exportAssignmentWithExports.ts(3,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/compiler/exportAssignmentWithExports.ts (1 errors) ==== export class C { } class D { } export = D; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt index 396d932e358..ff21d304e40 100644 --- a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts(7,10): error TS1003: Identifier expected. + + ==== tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts (1 errors) ==== function Greeter() { //... @@ -7,5 +10,5 @@ } export = new Greeter(); ~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/exportDeclareClass1.errors.txt b/tests/baselines/reference/exportDeclareClass1.errors.txt index 6ee2bc0e090..36103269f83 100644 --- a/tests/baselines/reference/exportDeclareClass1.errors.txt +++ b/tests/baselines/reference/exportDeclareClass1.errors.txt @@ -1,15 +1,21 @@ +tests/cases/compiler/exportDeclareClass1.ts(2,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/exportDeclareClass1.ts(2,24): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/compiler/exportDeclareClass1.ts(3,31): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/exportDeclareClass1.ts(3,34): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + + ==== tests/cases/compiler/exportDeclareClass1.ts (4 errors) ==== export declare class eaC { static tF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. static tsF(param:any) { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. }; export declare class eaC2 { diff --git a/tests/baselines/reference/exportDeclaredModule.errors.txt b/tests/baselines/reference/exportDeclaredModule.errors.txt index ffa54e92dcf..265061fe2f4 100644 --- a/tests/baselines/reference/exportDeclaredModule.errors.txt +++ b/tests/baselines/reference/exportDeclaredModule.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== import foo1 = require('./foo1'); var x: number = foo1.b(); @@ -9,5 +12,5 @@ } export = M1; ~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportEqualErrorType.errors.txt b/tests/baselines/reference/exportEqualErrorType.errors.txt index 1023e9eff25..db96a9dc523 100644 --- a/tests/baselines/reference/exportEqualErrorType.errors.txt +++ b/tests/baselines/reference/exportEqualErrorType.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/exportEqualErrorType_1.ts(3,23): error TS2339: Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. + + ==== tests/cases/compiler/exportEqualErrorType_1.ts (1 errors) ==== /// import connect = require('exportEqualErrorType_0'); connect().use(connect.static('foo')); // Error 1 The property 'static' does not exist on value of type ''. ~~~~~~ -!!! Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. +!!! error TS2339: Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. ==== tests/cases/compiler/exportEqualErrorType_0.ts (0 errors) ==== module server { diff --git a/tests/baselines/reference/exportEqualMemberMissing.errors.txt b/tests/baselines/reference/exportEqualMemberMissing.errors.txt index da061bc303e..3e6e7a35a12 100644 --- a/tests/baselines/reference/exportEqualMemberMissing.errors.txt +++ b/tests/baselines/reference/exportEqualMemberMissing.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/exportEqualMemberMissing_1.ts(3,23): error TS2339: Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. + + ==== tests/cases/compiler/exportEqualMemberMissing_1.ts (1 errors) ==== /// import connect = require('exportEqualMemberMissing_0'); connect().use(connect.static('foo')); // Error 1 The property 'static' does not exist on value of type ''. ~~~~~~ -!!! Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. +!!! error TS2339: Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. ==== tests/cases/compiler/exportEqualMemberMissing_0.ts (0 errors) ==== module server { diff --git a/tests/baselines/reference/exportNonVisibleType.errors.txt b/tests/baselines/reference/exportNonVisibleType.errors.txt index 7f615efc615..0eb73b2b04e 100644 --- a/tests/baselines/reference/exportNonVisibleType.errors.txt +++ b/tests/baselines/reference/exportNonVisibleType.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== interface I1 { a: string; @@ -7,7 +10,7 @@ var x: I1 = {a: "test", b: 42}; export = x; // Should fail, I1 not exported. ~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== diff --git a/tests/baselines/reference/exportSameNameFuncVar.errors.txt b/tests/baselines/reference/exportSameNameFuncVar.errors.txt index 44d0c5446bd..0103d0e8968 100644 --- a/tests/baselines/reference/exportSameNameFuncVar.errors.txt +++ b/tests/baselines/reference/exportSameNameFuncVar.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/exportSameNameFuncVar.ts(2,17): error TS2300: Duplicate identifier 'a'. + + ==== tests/cases/compiler/exportSameNameFuncVar.ts (1 errors) ==== export var a = 10; export function a() { ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. } \ No newline at end of file diff --git a/tests/baselines/reference/exportingContainingVisibleType.errors.txt b/tests/baselines/reference/exportingContainingVisibleType.errors.txt index 8649494ddb4..83f722b97da 100644 --- a/tests/baselines/reference/exportingContainingVisibleType.errors.txt +++ b/tests/baselines/reference/exportingContainingVisibleType.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/exportingContainingVisibleType.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/exportingContainingVisibleType.ts (1 errors) ==== class Foo { public get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var i: Foo; return i; // Should be fine (previous bug report visibility error). diff --git a/tests/baselines/reference/expr.errors.txt b/tests/baselines/reference/expr.errors.txt index 5b233d8a2da..41d15a0835b 100644 --- a/tests/baselines/reference/expr.errors.txt +++ b/tests/baselines/reference/expr.errors.txt @@ -1,3 +1,74 @@ +tests/cases/compiler/expr.ts(87,5): error TS2365: Operator '==' cannot be applied to types 'number' and 'string'. +tests/cases/compiler/expr.ts(88,5): error TS2365: Operator '==' cannot be applied to types 'number' and 'boolean'. +tests/cases/compiler/expr.ts(94,5): error TS2365: Operator '==' cannot be applied to types 'string' and 'number'. +tests/cases/compiler/expr.ts(95,5): error TS2365: Operator '==' cannot be applied to types 'string' and 'boolean'. +tests/cases/compiler/expr.ts(98,5): error TS2365: Operator '==' cannot be applied to types 'string' and 'E'. +tests/cases/compiler/expr.ts(115,5): error TS2365: Operator '==' cannot be applied to types 'E' and 'string'. +tests/cases/compiler/expr.ts(116,5): error TS2365: Operator '==' cannot be applied to types 'E' and 'boolean'. +tests/cases/compiler/expr.ts(142,5): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. +tests/cases/compiler/expr.ts(143,5): error TS2365: Operator '+' cannot be applied to types 'number' and 'I'. +tests/cases/compiler/expr.ts(161,5): error TS2365: Operator '+' cannot be applied to types 'I' and 'number'. +tests/cases/compiler/expr.ts(163,5): error TS2365: Operator '+' cannot be applied to types 'I' and 'boolean'. +tests/cases/compiler/expr.ts(165,5): error TS2365: Operator '+' cannot be applied to types 'I' and 'I'. +tests/cases/compiler/expr.ts(166,5): error TS2365: Operator '+' cannot be applied to types 'I' and 'E'. +tests/cases/compiler/expr.ts(170,5): error TS2365: Operator '+' cannot be applied to types 'E' and 'boolean'. +tests/cases/compiler/expr.ts(172,5): error TS2365: Operator '+' cannot be applied to types 'E' and 'I'. +tests/cases/compiler/expr.ts(176,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(177,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(178,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(182,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(183,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(184,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(184,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(185,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(185,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(186,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(186,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(187,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(190,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(191,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(192,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(196,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(197,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(197,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(198,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(198,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(199,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(200,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(200,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(201,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(204,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(205,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(207,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(211,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(212,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(213,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(217,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(218,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(219,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(219,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(220,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(220,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(221,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(221,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(222,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(225,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(226,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(227,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(231,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(232,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(232,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(233,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(233,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(234,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(235,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(235,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(236,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(239,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(240,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/expr.ts(242,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/expr.ts (69 errors) ==== interface I { } @@ -87,10 +158,10 @@ n==a; n==s; ~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'string'. n==b; ~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'boolean'. n==i; n==n; n==e; @@ -98,15 +169,15 @@ s==a; s==n; ~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'number'. s==b; ~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'boolean'. s==i; s==s; s==e; ~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'E'. a==n; a==s; @@ -125,10 +196,10 @@ e==n; e==s; ~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'string'. e==b; ~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'boolean'. e==a; e==i; e==e; @@ -156,10 +227,10 @@ n+s; n+b; ~~~ -!!! Operator '+' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. n+i; ~~~ -!!! Operator '+' cannot be applied to types 'number' and 'I'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'I'. n+n; n+e; @@ -179,206 +250,206 @@ i+n; ~~~ -!!! Operator '+' cannot be applied to types 'I' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'I' and 'number'. i+s; i+b; ~~~ -!!! Operator '+' cannot be applied to types 'I' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'I' and 'boolean'. i+a; i+i; ~~~ -!!! Operator '+' cannot be applied to types 'I' and 'I'. +!!! error TS2365: Operator '+' cannot be applied to types 'I' and 'I'. i+e; ~~~ -!!! Operator '+' cannot be applied to types 'I' and 'E'. +!!! error TS2365: Operator '+' cannot be applied to types 'I' and 'E'. e+n; e+s; e+b; ~~~ -!!! Operator '+' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'boolean'. e+a; e+i; ~~~ -!!! Operator '+' cannot be applied to types 'E' and 'I'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'I'. e+e; n^a; n^s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n^b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n^i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n^n; n^e; s^a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^n; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^i; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^s; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a^n; a^s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a^b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a^i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a^a; a^e; i^n; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^s; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^i; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e^n; e^s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e^b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e^a; e^i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e^e; n-a; n-s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n-b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n-i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n-n; n-e; s-a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-n; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-i; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-s; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a-n; a-s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a-b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a-i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a-a; a-e; i-n; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-s; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-i; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e-n; e-s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e-b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e-a; e-i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e-e; } \ No newline at end of file diff --git a/tests/baselines/reference/extBaseClass2.errors.txt b/tests/baselines/reference/extBaseClass2.errors.txt index 79e8525a8f3..5e49a2dbc47 100644 --- a/tests/baselines/reference/extBaseClass2.errors.txt +++ b/tests/baselines/reference/extBaseClass2.errors.txt @@ -1,15 +1,19 @@ +tests/cases/compiler/extBaseClass2.ts(2,29): error TS2305: Module 'M' has no exported member 'B'. +tests/cases/compiler/extBaseClass2.ts(7,29): error TS2304: Cannot find name 'B'. + + ==== tests/cases/compiler/extBaseClass2.ts (2 errors) ==== module N { export class C4 extends M.B { ~~~ -!!! Module 'M' has no exported member 'B'. +!!! error TS2305: Module 'M' has no exported member 'B'. } } module M { export class C5 extends B { ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. } } \ No newline at end of file diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt index 7b1fde446f8..83fededbcbc 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(7,7): error TS2421: Class 'D' incorrectly implements interface 'C': + Types of property 'bar' are incompatible: + Type '() => string' is not assignable to type '() => number': + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(12,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/extendAndImplementTheSameBaseType2.ts (3 errors) ==== class C { foo: number @@ -7,20 +15,20 @@ } class D extends C implements C { ~ -!!! Class 'D' incorrectly implements interface 'C': -!!! Types of property 'bar' are incompatible: -!!! Type '() => string' is not assignable to type '() => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2421: Class 'D' incorrectly implements interface 'C': +!!! error TS2421: Types of property 'bar' are incompatible: +!!! error TS2421: Type '() => string' is not assignable to type '() => number': +!!! error TS2421: Type 'string' is not assignable to type 'number'. baz() { } } var d: D = new D(); var r: string = d.foo; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var r2: number = d.foo; var r3: string = d.bar(); var r4: number = d.bar(); ~~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/extendArray.errors.txt b/tests/baselines/reference/extendArray.errors.txt index d9524acebcb..824752820cb 100644 --- a/tests/baselines/reference/extendArray.errors.txt +++ b/tests/baselines/reference/extendArray.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/extendArray.ts(7,19): error TS2304: Cannot find name '_element'. +tests/cases/compiler/extendArray.ts(7,32): error TS2304: Cannot find name '_element'. + + ==== tests/cases/compiler/extendArray.ts (2 errors) ==== var a = [1,2]; a.forEach(function (v,i,a) {}); @@ -7,9 +11,9 @@ interface Array { collect(fn:(e:_element) => _element[]) : any[]; ~~~~~~~~ -!!! Cannot find name '_element'. +!!! error TS2304: Cannot find name '_element'. ~~~~~~~~ -!!! Cannot find name '_element'. +!!! error TS2304: Cannot find name '_element'. } } diff --git a/tests/baselines/reference/extendGenericArray.errors.txt b/tests/baselines/reference/extendGenericArray.errors.txt index 19c93b7edc0..9a427267f1f 100644 --- a/tests/baselines/reference/extendGenericArray.errors.txt +++ b/tests/baselines/reference/extendGenericArray.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/extendGenericArray.ts(6,5): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/extendGenericArray.ts (1 errors) ==== interface Array { foo(): T; @@ -6,4 +9,4 @@ var arr: string[] = []; var x: number = arr.foo(); ~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/extendGenericArray2.errors.txt b/tests/baselines/reference/extendGenericArray2.errors.txt index 23ca38cd7a7..f411207b225 100644 --- a/tests/baselines/reference/extendGenericArray2.errors.txt +++ b/tests/baselines/reference/extendGenericArray2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/extendGenericArray2.ts(8,5): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/extendGenericArray2.ts (1 errors) ==== interface IFoo { x: T; @@ -8,4 +11,4 @@ var arr: string[] = []; var y: number = arr.x; ~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/extendNonClassSymbol1.errors.txt b/tests/baselines/reference/extendNonClassSymbol1.errors.txt index 730427f529d..587ac3a5f04 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.errors.txt +++ b/tests/baselines/reference/extendNonClassSymbol1.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/extendNonClassSymbol1.ts(3,17): error TS2304: Cannot find name 'x'. + + ==== tests/cases/compiler/extendNonClassSymbol1.ts (1 errors) ==== class A { foo() { } } var x = A; class C extends x { } // error, could not find symbol xs ~ -!!! Cannot find name 'x'. \ No newline at end of file +!!! error TS2304: Cannot find name 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/extendNonClassSymbol2.errors.txt b/tests/baselines/reference/extendNonClassSymbol2.errors.txt index 69328a3a713..1b54474ac39 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.errors.txt +++ b/tests/baselines/reference/extendNonClassSymbol2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/extendNonClassSymbol2.ts(5,17): error TS2304: Cannot find name 'Foo'. + + ==== tests/cases/compiler/extendNonClassSymbol2.ts (1 errors) ==== function Foo() { this.x = 1; @@ -5,4 +8,4 @@ var x = new Foo(); // legal, considered a constructor function class C extends Foo {} // error, could not find symbol Foo ~~~ -!!! Cannot find name 'Foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'Foo'. \ No newline at end of file diff --git a/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt b/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt index 5cabc36a6b8..7d7fea1b2c6 100644 --- a/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt +++ b/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt @@ -1,7 +1,12 @@ +tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts(1,42): error TS2300: Duplicate identifier 'A'. +tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts(9,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts(9,38): error TS2300: Duplicate identifier 'C'. + + ==== tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts (3 errors) ==== interface InterfaceWithMultipleTypars { // should error ~ -!!! Duplicate identifier 'A'. +!!! error TS2300: Duplicate identifier 'A'. bar(): void; } @@ -11,8 +16,8 @@ interface InterfaceWithSomeTypars { // should error ~~~~~~~~~~~~~~~~~~~~~~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. bar2(): void; } \ No newline at end of file diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.errors.txt b/tests/baselines/reference/extendsClauseAlreadySeen.errors.txt index f24e3bbc9f4..b2df83aeb0f 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.errors.txt +++ b/tests/baselines/reference/extendsClauseAlreadySeen.errors.txt @@ -1,15 +1,21 @@ +tests/cases/compiler/extendsClauseAlreadySeen.ts(4,19): error TS1005: '{' expected. +tests/cases/compiler/extendsClauseAlreadySeen.ts(4,29): error TS1005: ';' expected. +tests/cases/compiler/extendsClauseAlreadySeen.ts(5,11): error TS1005: ';' expected. +tests/cases/compiler/extendsClauseAlreadySeen.ts(5,5): error TS2304: Cannot find name 'baz'. + + ==== tests/cases/compiler/extendsClauseAlreadySeen.ts (4 errors) ==== class C { } class D extends C extends C { ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. baz() { } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~ -!!! Cannot find name 'baz'. +!!! error TS2304: Cannot find name 'baz'. } \ No newline at end of file diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.errors.txt b/tests/baselines/reference/extendsClauseAlreadySeen2.errors.txt index 9e5c02a4255..45971dc62f3 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.errors.txt +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.errors.txt @@ -1,15 +1,20 @@ +tests/cases/compiler/extendsClauseAlreadySeen2.ts(4,30): error TS1005: '{' expected. +tests/cases/compiler/extendsClauseAlreadySeen2.ts(4,38): error TS2365: Operator '>' cannot be applied to types 'boolean' and '{ baz: () => void; }'. +tests/cases/compiler/extendsClauseAlreadySeen2.ts(4,40): error TS2304: Cannot find name 'string'. + + ==== tests/cases/compiler/extendsClauseAlreadySeen2.ts (3 errors) ==== class C { } class D extends C extends C { ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~~~~~~~~~~~ ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. baz() { } ~~~~~~~~~~~~~ } ~ -!!! Operator '>' cannot be applied to types 'boolean' and '{ baz: () => void; }'. \ No newline at end of file +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and '{ baz: () => void; }'. \ No newline at end of file diff --git a/tests/baselines/reference/extension.errors.txt b/tests/baselines/reference/extension.errors.txt index 1a5a8f1f01d..9756d2920d1 100644 --- a/tests/baselines/reference/extension.errors.txt +++ b/tests/baselines/reference/extension.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/extension.ts(16,5): error TS1128: Declaration or statement expected. +tests/cases/compiler/extension.ts(16,22): error TS1005: ';' expected. +tests/cases/compiler/extension.ts(16,12): error TS2304: Cannot find name 'extension'. +tests/cases/compiler/extension.ts(16,28): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/extension.ts(22,3): error TS2339: Property 'pe' does not exist on type 'C'. + + ==== tests/cases/compiler/extension.ts (5 errors) ==== interface I { x; @@ -16,13 +23,13 @@ declare module M { export extension class C { ~~~~~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. ~~~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~ -!!! Cannot find name 'extension'. +!!! error TS2304: Cannot find name 'extension'. ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. public pe:string; } } @@ -30,7 +37,7 @@ var c=new M.C(); c.pe; ~~ -!!! Property 'pe' does not exist on type 'C'. +!!! error TS2339: Property 'pe' does not exist on type 'C'. c.p; var i:I; i.x; diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index 613f6d9f8d7..49b1598f06e 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -1,24 +1,39 @@ +tests/cases/compiler/externModule.ts(1,9): error TS1005: ';' expected. +tests/cases/compiler/externModule.ts(1,16): error TS1005: ';' expected. +tests/cases/compiler/externModule.ts(2,5): error TS1129: Statement expected. +tests/cases/compiler/externModule.ts(2,18): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/externModule.ts(30,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/externModule.ts(1,1): error TS2304: Cannot find name 'declare'. +tests/cases/compiler/externModule.ts(1,9): error TS2304: Cannot find name 'module'. +tests/cases/compiler/externModule.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/externModule.ts(4,10): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/externModule.ts(18,6): error TS2390: Constructor implementation is missing. +tests/cases/compiler/externModule.ts(20,13): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/externModule.ts(26,13): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/externModule.ts(28,13): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/externModule.ts (13 errors) ==== declare module { ~~~~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~ -!!! Cannot find name 'declare'. +!!! error TS2304: Cannot find name 'declare'. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. export class XDate { ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public getDay():number; ~~~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. public getXDate():number; ~~~~~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. // etc. // Called as a function @@ -34,11 +49,11 @@ constructor(value: number); constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. static parse(string: string): number; ~~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. static UTC(year: number, month: number): number; static UTC(year: number, month: number, date: number): number; static UTC(year: number, month: number, date: number, hours: number): number; @@ -46,15 +61,15 @@ static UTC(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): number; static UTC(year: number, month: number, date: number, hours: number, minutes: number, seconds: number, ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ms: number): number; static now(): number; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var d=new XDate(); d.getDay(); diff --git a/tests/baselines/reference/externSemantics.errors.txt b/tests/baselines/reference/externSemantics.errors.txt index 2732c28d1ce..b58e2a4950c 100644 --- a/tests/baselines/reference/externSemantics.errors.txt +++ b/tests/baselines/reference/externSemantics.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/externSemantics.ts(1,14): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/compiler/externSemantics.ts(3,21): error TS1039: Initializers are not allowed in ambient contexts. + + ==== tests/cases/compiler/externSemantics.ts (2 errors) ==== declare var x=10; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. declare var v; declare var y:number=3; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. \ No newline at end of file diff --git a/tests/baselines/reference/externSyntax.errors.txt b/tests/baselines/reference/externSyntax.errors.txt index 791df1b7e0e..099c9fa3a99 100644 --- a/tests/baselines/reference/externSyntax.errors.txt +++ b/tests/baselines/reference/externSyntax.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/externSyntax.ts(8,20): error TS1037: A function implementation cannot be declared in an ambient context. + + ==== tests/cases/compiler/externSyntax.ts (1 errors) ==== declare var v; declare module M { @@ -8,7 +11,7 @@ public f(); public g() { } // error body ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. } } diff --git a/tests/baselines/reference/externalModuleExportingGenericClass.errors.txt b/tests/baselines/reference/externalModuleExportingGenericClass.errors.txt index 651f1a2f945..c8712b20864 100644 --- a/tests/baselines/reference/externalModuleExportingGenericClass.errors.txt +++ b/tests/baselines/reference/externalModuleExportingGenericClass.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/externalModuleExportingGenericClass_file1.ts(2,8): error TS2314: Generic type 'C' requires 1 type argument(s). + + ==== tests/cases/compiler/externalModuleExportingGenericClass_file1.ts (1 errors) ==== import a = require('externalModuleExportingGenericClass_file0'); var v: a; // this should report error ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var v2: any = (new a()).foo; var v3: number = (new a()).foo; diff --git a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.errors.txt b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.errors.txt index f2dca2d5f44..588183c6283 100644 --- a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.errors.txt +++ b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file3.ts(3,7): error TS2339: Property 'foo' does not exist on type 'typeof "externalModuleRefernceResolutionOrderInImportDeclaration_file1"'. + + ==== tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file3.ts (1 errors) ==== /// import file1 = require('externalModuleRefernceResolutionOrderInImportDeclaration_file1'); file1.foo(); ~~~ -!!! Property 'foo' does not exist on type 'typeof "externalModuleRefernceResolutionOrderInImportDeclaration_file1"'. +!!! error TS2339: Property 'foo' does not exist on type 'typeof "externalModuleRefernceResolutionOrderInImportDeclaration_file1"'. file1.bar(); diff --git a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt index e10855a94ea..f061276aa1a 100644 --- a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt +++ b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts (1 errors) ==== // Not on line 0 because we want to verify the error is placed in the appropriate location. export module M { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. } \ No newline at end of file diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt b/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt index 132e369a643..c3ad9b9c159 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt @@ -1,49 +1,69 @@ +tests/cases/compiler/fatarrowfunctionsErrors.ts(2,8): error TS1005: ',' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(2,18): error TS1005: ':' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(2,19): error TS1005: ',' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(2,20): error TS1128: Declaration or statement expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(2,21): error TS1128: Declaration or statement expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(5,10): error TS1005: ',' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(5,18): error TS1005: ';' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(9,19): error TS1005: '=>' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(10,27): error TS1005: '=>' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(11,21): error TS1005: '=>' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(12,23): error TS1005: '=>' expected. +tests/cases/compiler/fatarrowfunctionsErrors.ts(1,1): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/fatarrowfunctionsErrors.ts(2,1): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/fatarrowfunctionsErrors.ts(3,1): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/fatarrowfunctionsErrors.ts(4,1): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/fatarrowfunctionsErrors.ts(5,9): error TS2304: Cannot find name 'x'. +tests/cases/compiler/fatarrowfunctionsErrors.ts(5,21): error TS2304: Cannot find name 'x'. +tests/cases/compiler/fatarrowfunctionsErrors.ts(5,23): error TS2304: Cannot find name 'x'. + + ==== tests/cases/compiler/fatarrowfunctionsErrors.ts (18 errors) ==== foo((...Far:any[])=>{return 0;}) ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. foo((1)=>{return 0;}); ~~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. foo((x?)=>{return x;}) ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. foo((x=0)=>{return x;}) ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. var y = x:number => x*x; ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. false? (() => null): null; // missing fatarrow var x1 = () :void {}; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var x2 = (a:number) :void {}; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var x3 = (a:number) {}; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var x4= (...a: any[]) { }; ~ -!!! '=>' expected. \ No newline at end of file +!!! error TS1005: '=>' expected. \ No newline at end of file diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.errors.txt b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.errors.txt index a73ec1dd734..e445a1460f5 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(60,10): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(70,11): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(80,17): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(88,23): error TS1005: ';' expected. +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(88,38): error TS1005: ';' expected. +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(106,3): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(106,35): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(126,6): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts(128,9): error TS1015: Parameter cannot have question mark and initializer. + + ==== tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts (9 errors) ==== // valid @@ -60,7 +71,7 @@ false ? (arg?: number) => 46 : null; false ? (arg?: number = 0) => 47 : null; ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. false ? (...arg: number[]) => 48 : null; // in ternary exression within paren @@ -72,7 +83,7 @@ false ? ((arg?: number) => 56) : null; false ? ((arg?: number = 0) => 57) : null; ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. false ? ((...arg: number[]) => 58) : null; // ternary exression's else clause @@ -84,7 +95,7 @@ false ? null : (arg?: number) => 66; false ? null : (arg?: number = 0) => 67; ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. false ? null : (...arg: number[]) => 68; @@ -94,9 +105,9 @@ //multiple levels (a?) => { return a; } ? (b)=>(c)=>81 : (c)=>(d)=>82; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // In Expressions @@ -116,9 +127,9 @@ ((arg:number = 1) => 0) + '' + ((arg:number = 2) => 105); ((arg?:number = 1) => 0) + '' + ((arg?:number = 2) => 106); ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ((...arg:number[]) => 0) + '' + ((...arg:number[]) => 107); ((arg1, arg2?) => 0) + '' + ((arg1,arg2?) => 108); ((arg1, ...arg2:number[]) => 0) + '' + ((arg1, ...arg2:number[]) => 108); @@ -140,11 +151,11 @@ (a = 0) => 117, (a?: number = 0) => 118, ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. (...a: number[]) => 119, (a, b? = 0, ...c: number[]) => 120, ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. (a) => (b) => (c) => 121, false? (a) => 0 : (b) => 122 ); \ No newline at end of file diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.errors.txt b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.errors.txt index fd103a3dea2..ce937dd55dc 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.errors.txt @@ -1,19 +1,26 @@ +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(1,9): error TS1016: A required parameter cannot follow an optional parameter. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(2,5): error TS1047: A rest parameter cannot be optional. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(4,5): error TS1048: A rest parameter cannot have an initializer. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(5,5): error TS1003: Identifier expected. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(8,12): error TS1016: A required parameter cannot follow an optional parameter. + + ==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts (5 errors) ==== (arg1?, arg2) => 101; ~~~~ -!!! A required parameter cannot follow an optional parameter. +!!! error TS1016: A required parameter cannot follow an optional parameter. (...arg?) => 102; ~~~ -!!! A rest parameter cannot be optional. +!!! error TS1047: A rest parameter cannot be optional. (...arg) => 103; (...arg:number [] = []) => 104; ~~~ -!!! A rest parameter cannot have an initializer. +!!! error TS1048: A rest parameter cannot have an initializer. (...) => 105; ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. // Non optional parameter following an optional one (arg1 = 1, arg2) => 1; ~~~~ -!!! A required parameter cannot follow an optional parameter. \ No newline at end of file +!!! error TS1016: A required parameter cannot follow an optional parameter. \ No newline at end of file diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt index daaa90c3ca4..ce237236ca7 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt @@ -1,39 +1,58 @@ +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,23): error TS1005: ';' expected. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,23): error TS1005: ';' expected. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(4,17): error TS1005: ';' expected. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,12): error TS2304: Cannot find name 'a'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,16): error TS2304: Cannot find name 'b'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,19): error TS2304: Cannot find name 'c'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,26): error TS2304: Cannot find name 'a'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,28): error TS2304: Cannot find name 'b'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,30): error TS2304: Cannot find name 'c'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,13): error TS2304: Cannot find name 'a'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,17): error TS2304: Cannot find name 'b'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,20): error TS2304: Cannot find name 'c'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,26): error TS2304: Cannot find name 'a'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,28): error TS2304: Cannot find name 'b'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,30): error TS2304: Cannot find name 'c'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(4,13): error TS2304: Cannot find name 'a'. +tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(4,20): error TS2304: Cannot find name 'a'. + + ==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts (17 errors) ==== var tt1 = (a, (b, c)) => a+b+c; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ~ -!!! Cannot find name 'c'. +!!! error TS2304: Cannot find name 'c'. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ~ -!!! Cannot find name 'c'. +!!! error TS2304: Cannot find name 'c'. var tt2 = ((a), b, c) => a+b+c; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ~ -!!! Cannot find name 'c'. +!!! error TS2304: Cannot find name 'c'. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ~ -!!! Cannot find name 'c'. +!!! error TS2304: Cannot find name 'c'. var tt3 = ((a)) => a; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'a'. \ No newline at end of file +!!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt index 40d00c1cff7..ef205adfd42 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt +++ b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/fieldAndGetterWithSameName.ts(3,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/fieldAndGetterWithSameName.ts(3,7): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/compiler/fieldAndGetterWithSameName.ts (2 errors) ==== export class C { x: number; get x(): number { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/for-inStatements.errors.txt b/tests/baselines/reference/for-inStatements.errors.txt index e90e3dea3d2..7e20b8ca316 100644 --- a/tests/baselines/reference/for-inStatements.errors.txt +++ b/tests/baselines/reference/for-inStatements.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(79,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. + + ==== tests/cases/conformance/statements/for-inStatements/for-inStatements.ts (1 errors) ==== var aString: string; for (aString in {}) { } @@ -79,5 +82,5 @@ for (var x in Color) { } for (var x in Color.Blue) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/for-inStatementsInvalid.errors.txt b/tests/baselines/reference/for-inStatementsInvalid.errors.txt index 4b4fff8c51c..67e536a3069 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.errors.txt +++ b/tests/baselines/reference/for-inStatementsInvalid.errors.txt @@ -1,48 +1,66 @@ +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(2,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(5,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(8,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(10,10): error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(13,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(17,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(18,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(19,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(20,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(21,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(22,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(29,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(38,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(46,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(51,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(62,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. + + ==== tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts (16 errors) ==== var aNumber: number; for (aNumber in {}) { } ~~~~~~~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. var aBoolean: boolean; for (aBoolean in {}) { } ~~~~~~~~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. var aRegExp: RegExp; for (aRegExp in {}) { } ~~~~~~~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. for (var idx : number in {}) { } ~~~ -!!! The left-hand side of a 'for...in' statement cannot use a type annotation. +!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. function fn(): void { } for (var x in fn()) { } ~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. var c : string, d:string, e; for (var x in c || d) { } ~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in e ? c : d) { } ~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in 42 ? c : d) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in '' ? c : d) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in 42 ? d[x] : c[x]) { } ~~~~~~~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in c[23]) { } ~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in ((x: T) => x)) { } for (var x in function (x: string, y: number) { return x + y }) { } @@ -51,7 +69,7 @@ biz() : number{ for (var x in this.biz()) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in this.biz) { } for (var x in this) { } return null; @@ -62,7 +80,7 @@ for (var x in this.baz) { } for (var x in this.baz()) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. return null; } @@ -72,14 +90,14 @@ boz() { for (var x in this.biz()) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in this.biz) { } for (var x in this) { } for (var x in super.biz) { } for (var x in super.biz()) { } ~~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. return null; } } @@ -92,5 +110,5 @@ for (var x in i[42]) { } ~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/for.errors.txt b/tests/baselines/reference/for.errors.txt index 8df068271a2..41ed5765c9a 100644 --- a/tests/baselines/reference/for.errors.txt +++ b/tests/baselines/reference/for.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/for.ts(29,6): error TS1109: Expression expected. + + ==== tests/cases/compiler/for.ts (1 errors) ==== for (var i = 0; i < 10; i++) { // ok var x1 = i; @@ -29,5 +32,5 @@ for () { // error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/forIn.errors.txt b/tests/baselines/reference/forIn.errors.txt index 51a3b220359..ccc1423f1aa 100644 --- a/tests/baselines/reference/forIn.errors.txt +++ b/tests/baselines/reference/forIn.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/forIn.ts(2,10): error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. +tests/cases/compiler/forIn.ts(20,4): error TS2304: Cannot find name 'k'. + + ==== tests/cases/compiler/forIn.ts (2 errors) ==== var arr = null; for (var i:number in arr) { // error ~ -!!! The left-hand side of a 'for...in' statement cannot use a type annotation. +!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. var x1 = arr[i]; var y1 = arr[i]; } @@ -22,5 +26,5 @@ // error in the body k[l] = 1; ~ -!!! Cannot find name 'k'. +!!! error TS2304: Cannot find name 'k'. } \ No newline at end of file diff --git a/tests/baselines/reference/forIn2.errors.txt b/tests/baselines/reference/forIn2.errors.txt index c1dbfa2da9b..f6a0b34e3e6 100644 --- a/tests/baselines/reference/forIn2.errors.txt +++ b/tests/baselines/reference/forIn2.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/forIn2.ts(1,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. + + ==== tests/cases/compiler/forIn2.ts (1 errors) ==== for (var i in 1) { ~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/forInStatement2.errors.txt b/tests/baselines/reference/forInStatement2.errors.txt index ef064280a7e..575936eab5e 100644 --- a/tests/baselines/reference/forInStatement2.errors.txt +++ b/tests/baselines/reference/forInStatement2.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/forInStatement2.ts(2,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. + + ==== tests/cases/compiler/forInStatement2.ts (1 errors) ==== var expr: number; for (var a in expr) { ~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/forInStatement4.errors.txt b/tests/baselines/reference/forInStatement4.errors.txt index b228fb93c89..816f706c77c 100644 --- a/tests/baselines/reference/forInStatement4.errors.txt +++ b/tests/baselines/reference/forInStatement4.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/forInStatement4.ts(2,10): error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. + + ==== tests/cases/compiler/forInStatement4.ts (1 errors) ==== var expr: any; for (var a: number in expr) { ~ -!!! The left-hand side of a 'for...in' statement cannot use a type annotation. +!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/forInStatement7.errors.txt b/tests/baselines/reference/forInStatement7.errors.txt index 432fe82237f..6f8e18c40ab 100644 --- a/tests/baselines/reference/forInStatement7.errors.txt +++ b/tests/baselines/reference/forInStatement7.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/forInStatement7.ts(3,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. + + ==== tests/cases/compiler/forInStatement7.ts (1 errors) ==== var a: number; var expr: any; for (a in expr) { ~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. } \ No newline at end of file diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt b/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt index 17f50e3ff10..b653bc01f55 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt @@ -1,3 +1,17 @@ +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'. +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(35,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(36,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(39,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(40,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(43,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(46,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(47,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(50,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. +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) ==== interface I { id: number; @@ -32,47 +46,47 @@ for( var a: any;;){} for( var a = 1;;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. +!!! 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';;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. for( var a = new C();;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. for( var a = new D();;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. for( var a = M;;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. for( var b: I;;){} for( var b = new C();;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. for( var b = new C2();;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. for(var f = F;;){} for( var f = (x: number) => '';;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. for(var arr: string[];;){} for( var arr = [1, 2, 3, 4];;){} ~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. for( var arr = [new C(), new C2(), new D()];;){} ~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. for(var arr2 = [new D()];;){} for( var arr2 = new Array>();;){} ~~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. for(var m: typeof M;;){} for( var m = M.A;;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/forgottenNew.errors.txt b/tests/baselines/reference/forgottenNew.errors.txt index ba44223819c..56e5d2bfd24 100644 --- a/tests/baselines/reference/forgottenNew.errors.txt +++ b/tests/baselines/reference/forgottenNew.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/expressions/functionCalls/forgottenNew.ts(5,14): error TS2348: Value of type 'typeof NullLogger' is not callable. Did you mean to include 'new'? + + ==== tests/cases/conformance/expressions/functionCalls/forgottenNew.ts (1 errors) ==== module Tools { export class NullLogger { } @@ -5,4 +8,4 @@ var logger = Tools.NullLogger(); ~~~~~~~~~~~~~~~~~~ -!!! Value of type 'typeof NullLogger' is not callable. Did you mean to include 'new'? \ No newline at end of file +!!! error TS2348: Value of type 'typeof NullLogger' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/funClodule.errors.txt b/tests/baselines/reference/funClodule.errors.txt index e4d72d3fc0d..20598f276f3 100644 --- a/tests/baselines/reference/funClodule.errors.txt +++ b/tests/baselines/reference/funClodule.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/funClodule.ts(5,15): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/funClodule.ts(12,18): error TS2300: Duplicate identifier 'foo2'. +tests/cases/compiler/funClodule.ts(19,7): error TS2300: Duplicate identifier 'foo3'. + + ==== tests/cases/compiler/funClodule.ts (3 errors) ==== declare function foo(); declare module foo { @@ -5,7 +10,7 @@ } declare class foo { } // Should error ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. declare class foo2 { } @@ -14,7 +19,7 @@ } declare function foo2(); // Should error ~~~~ -!!! Duplicate identifier 'foo2'. +!!! error TS2300: Duplicate identifier 'foo2'. function foo3() { } @@ -23,4 +28,4 @@ } class foo3 { } // Should error ~~~~ -!!! Duplicate identifier 'foo3'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'foo3'. \ No newline at end of file diff --git a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt index 58936d29dbb..72f24af0c63 100644 --- a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt +++ b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts(6,5): error TS2411: Property 'prop' of type 'number' is not assignable to string index type 'string'. + + ==== tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts (2 errors) ==== function Foo(s: string); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function Foo(n: number) { } interface Foo { [s: string]: string; prop: number; ~~~~~~~~~~~~~ -!!! Property 'prop' of type 'number' is not assignable to string index type 'string'. +!!! error TS2411: Property 'prop' of type 'number' is not assignable to string index type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt index 4eda4b8136c..8b1efe089c1 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt +++ b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/functionAndPropertyNameConflict.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/functionAndPropertyNameConflict.ts(3,16): error TS2300: Duplicate identifier 'aaaaa'. + + ==== tests/cases/compiler/functionAndPropertyNameConflict.ts (2 errors) ==== class C65 { public aaaaa() { } public get aaaaa() { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~ -!!! Duplicate identifier 'aaaaa'. +!!! error TS2300: Duplicate identifier 'aaaaa'. return 1; } } \ No newline at end of file diff --git a/tests/baselines/reference/functionArgShadowing.errors.txt b/tests/baselines/reference/functionArgShadowing.errors.txt index f1583f4185e..93022178452 100644 --- a/tests/baselines/reference/functionArgShadowing.errors.txt +++ b/tests/baselines/reference/functionArgShadowing.errors.txt @@ -1,20 +1,25 @@ +tests/cases/compiler/functionArgShadowing.ts(4,8): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'A', but here has type 'B'. +tests/cases/compiler/functionArgShadowing.ts(5,8): error TS2339: Property 'bar' does not exist on type 'A'. +tests/cases/compiler/functionArgShadowing.ts(10,7): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'number', but here has type 'string'. + + ==== tests/cases/compiler/functionArgShadowing.ts (3 errors) ==== class A { foo() { } } class B { bar() { } } function foo(x: A) { var x: B = new B(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'A', but here has type 'B'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'A', but here has type 'B'. x.bar(); // the property bar does not exist on a value of type A ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. } class C { constructor(public p: number) { var p: string; ~ -!!! Subsequent variable declarations must have the same type. Variable 'p' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'number', but here has type 'string'. var n: number = p; } diff --git a/tests/baselines/reference/functionAssignment.errors.txt b/tests/baselines/reference/functionAssignment.errors.txt index 76981e98885..c588d7fdc43 100644 --- a/tests/baselines/reference/functionAssignment.errors.txt +++ b/tests/baselines/reference/functionAssignment.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/functionAssignment.ts(22,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/functionAssignment.ts(34,17): error TS2339: Property 'length' does not exist on type 'number'. + + ==== tests/cases/compiler/functionAssignment.ts (2 errors) ==== function f(n: Function) { } f(function () { }); @@ -22,7 +26,7 @@ var n = ''; n = 4; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. }); function f3(a: { a: number; b: number; }) { } @@ -36,7 +40,7 @@ callb((a) =>{ a.length; }); ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall10.errors.txt b/tests/baselines/reference/functionCall10.errors.txt index 5ae80cff0e8..8352fc70a58 100644 --- a/tests/baselines/reference/functionCall10.errors.txt +++ b/tests/baselines/reference/functionCall10.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/functionCall10.ts(3,5): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/functionCall10.ts(5,8): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. + + ==== tests/cases/compiler/functionCall10.ts (2 errors) ==== function foo(...a:number[]){}; foo(0, 1); foo('foo'); ~~~~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. foo(); foo(1, 'bar'); ~~~~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall11.errors.txt b/tests/baselines/reference/functionCall11.errors.txt index 91593adb4e5..a1790974bbb 100644 --- a/tests/baselines/reference/functionCall11.errors.txt +++ b/tests/baselines/reference/functionCall11.errors.txt @@ -1,14 +1,19 @@ +tests/cases/compiler/functionCall11.ts(4,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/functionCall11.ts(5,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/functionCall11.ts(6,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/functionCall11.ts (3 errors) ==== function foo(a:string, b?:number){} foo('foo', 1); foo('foo'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 'bar'); ~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall12.errors.txt b/tests/baselines/reference/functionCall12.errors.txt index 1a89772d74e..eabe1131ec1 100644 --- a/tests/baselines/reference/functionCall12.errors.txt +++ b/tests/baselines/reference/functionCall12.errors.txt @@ -1,15 +1,20 @@ +tests/cases/compiler/functionCall12.ts(4,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/functionCall12.ts(5,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/functionCall12.ts(7,15): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/functionCall12.ts (3 errors) ==== function foo(a:string, b?:number, c?:string){} foo('foo', 1); foo('foo'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 'bar'); foo('foo', 1, 3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall13.errors.txt b/tests/baselines/reference/functionCall13.errors.txt index 72a06c77c94..31c05915aab 100644 --- a/tests/baselines/reference/functionCall13.errors.txt +++ b/tests/baselines/reference/functionCall13.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/functionCall13.ts(4,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/functionCall13.ts(5,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/functionCall13.ts (2 errors) ==== function foo(a:string, ...b:number[]){} foo('foo', 1); foo('foo'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall14.errors.txt b/tests/baselines/reference/functionCall14.errors.txt index adfd2530532..3b671d0252b 100644 --- a/tests/baselines/reference/functionCall14.errors.txt +++ b/tests/baselines/reference/functionCall14.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/functionCall14.ts(5,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/functionCall14.ts (1 errors) ==== function foo(a?:string, ...b:number[]){} foo('foo', 1); @@ -5,6 +8,6 @@ foo(); foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall15.errors.txt b/tests/baselines/reference/functionCall15.errors.txt index cb009fc63ab..09c246d34dc 100644 --- a/tests/baselines/reference/functionCall15.errors.txt +++ b/tests/baselines/reference/functionCall15.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/functionCall15.ts(1,39): error TS2300: Duplicate identifier 'b'. + + ==== tests/cases/compiler/functionCall15.ts (1 errors) ==== function foo(a?:string, b?:number, ...b:number[]){} ~ -!!! Duplicate identifier 'b'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall16.errors.txt b/tests/baselines/reference/functionCall16.errors.txt index f29d90f56c2..eb71df23eca 100644 --- a/tests/baselines/reference/functionCall16.errors.txt +++ b/tests/baselines/reference/functionCall16.errors.txt @@ -1,15 +1,20 @@ +tests/cases/compiler/functionCall16.ts(2,12): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/functionCall16.ts(5,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/functionCall16.ts(6,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/functionCall16.ts (3 errors) ==== function foo(a:string, b?:string, ...c:number[]){} foo('foo', 1); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo'); foo('foo', 'bar'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar', 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall17.errors.txt b/tests/baselines/reference/functionCall17.errors.txt index f6280586cb2..09f36c22cfb 100644 --- a/tests/baselines/reference/functionCall17.errors.txt +++ b/tests/baselines/reference/functionCall17.errors.txt @@ -1,17 +1,23 @@ +tests/cases/compiler/functionCall17.ts(2,12): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/functionCall17.ts(4,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/functionCall17.ts(5,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/functionCall17.ts(6,12): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/functionCall17.ts (4 errors) ==== function foo(a:string, b?:string, c?:number, ...d:number[]){} foo('foo', 1); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar', 3, 4); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall6.errors.txt b/tests/baselines/reference/functionCall6.errors.txt index c871e15d30a..4da265ea5e2 100644 --- a/tests/baselines/reference/functionCall6.errors.txt +++ b/tests/baselines/reference/functionCall6.errors.txt @@ -1,13 +1,18 @@ +tests/cases/compiler/functionCall6.ts(3,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/functionCall6.ts(4,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/functionCall6.ts(5,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/functionCall6.ts (3 errors) ==== function foo(a:string){}; foo('bar'); foo(2); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar'); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall7.errors.txt b/tests/baselines/reference/functionCall7.errors.txt index d41add08dd3..576ea9c266e 100644 --- a/tests/baselines/reference/functionCall7.errors.txt +++ b/tests/baselines/reference/functionCall7.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/functionCall7.ts(5,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/functionCall7.ts(6,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'c1'. +tests/cases/compiler/functionCall7.ts(7,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/functionCall7.ts (3 errors) ==== module m1 { export class c1 { public a; }} function foo(a:m1.c1){ a.a = 1; }; @@ -5,11 +10,11 @@ foo(myC); foo(myC, myC); ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(4); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'c1'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'c1'. foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall8.errors.txt b/tests/baselines/reference/functionCall8.errors.txt index 85eee804724..0e5479c8cfd 100644 --- a/tests/baselines/reference/functionCall8.errors.txt +++ b/tests/baselines/reference/functionCall8.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/functionCall8.ts(3,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/functionCall8.ts(4,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/functionCall8.ts (2 errors) ==== function foo(a?:string){} foo('foo'); foo('foo', 'bar'); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(4); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo(); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall9.errors.txt b/tests/baselines/reference/functionCall9.errors.txt index 5feb59f77c6..d9d00593414 100644 --- a/tests/baselines/reference/functionCall9.errors.txt +++ b/tests/baselines/reference/functionCall9.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/functionCall9.ts(4,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/functionCall9.ts(5,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/functionCall9.ts (2 errors) ==== function foo(a?:string, b?:number){}; foo('foo', 1); foo('foo'); foo('foo','bar'); ~~~~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. foo('foo', 1, 'bar'); ~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(); \ No newline at end of file diff --git a/tests/baselines/reference/functionCalls.errors.txt b/tests/baselines/reference/functionCalls.errors.txt index 3aa587c70a3..dc1417cdc98 100644 --- a/tests/baselines/reference/functionCalls.errors.txt +++ b/tests/baselines/reference/functionCalls.errors.txt @@ -1,3 +1,14 @@ +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(9,1): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(10,1): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(11,1): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(26,1): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(27,1): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(28,1): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(33,1): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(34,1): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/functionCalls/functionCalls.ts(35,1): error TS2347: Untyped function calls may not accept type arguments. + + ==== tests/cases/conformance/expressions/functionCalls/functionCalls.ts (9 errors) ==== // Invoke function call on value of type 'any' with no type arguments @@ -9,13 +20,13 @@ // These should be errors anyVar('hello'); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. anyVar(); ~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. anyVar(undefined); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. // Invoke function call on value of a subtype of Function with no call signatures with no type arguments @@ -32,24 +43,24 @@ // These should be errors subFunc(0); ~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. subFunc(''); ~~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. subFunc(); ~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. // Invoke function call on value of type Function with no call signatures with type arguments // These should be errors var func: Function; func(0); ~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. func(''); ~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. func(); ~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt index 3fb2b84fed5..4af5c01c505 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt +++ b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(5,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Function'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(6,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(7,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(23,14): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(24,15): error TS2345: Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(25,15): error TS2345: Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(26,15): error TS2345: Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(28,16): error TS2345: Argument of type '(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(29,16): error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(30,16): error TS2345: Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(34,16): error TS2345: Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(36,38): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(37,10): error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(38,10): error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. + + ==== tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts (14 errors) ==== // satisfaction of a constraint to Function, all of these invocations are errors unless otherwise noted @@ -5,13 +21,13 @@ foo(1); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Function'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Function'. foo(() => { }, 1); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, () => { }); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. function foo2 string>(x: T): T { return x; } @@ -29,41 +45,41 @@ var r = foo2(new Function()); ~~~~~~~~~~~~~~ -!!! Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. var r2 = foo2((x: string[]) => x); ~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. var r6 = foo2(C); ~ -!!! Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. var r7 = foo2(b); ~ -!!! Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. var r8 = foo2((x: U) => x); // no error expected var r11 = foo2((x: U, y: V) => x); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type '(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'. var r13 = foo2(C2); ~~ -!!! Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. var r14 = foo2(b2); ~~ -!!! Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. interface F2 extends Function { foo: string; } var f2: F2; var r16 = foo2(f2); ~~ -!!! Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. function fff(x: T, y: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo2(x); ~ -!!! Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. foo2(y); ~ -!!! Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionExpressionInWithBlock.errors.txt b/tests/baselines/reference/functionExpressionInWithBlock.errors.txt index 6a0947e95b2..eabb8af49f9 100644 --- a/tests/baselines/reference/functionExpressionInWithBlock.errors.txt +++ b/tests/baselines/reference/functionExpressionInWithBlock.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/functionExpressionInWithBlock.ts(2,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. + + ==== tests/cases/compiler/functionExpressionInWithBlock.ts (1 errors) ==== function x() { with({}) { ~~ -!!! All symbols within a 'with' block will be resolved to 'any'. +!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. function f() { () => this; } diff --git a/tests/baselines/reference/functionExpressionShadowedByParams.errors.txt b/tests/baselines/reference/functionExpressionShadowedByParams.errors.txt index e8f34d5d556..74b4c171a57 100644 --- a/tests/baselines/reference/functionExpressionShadowedByParams.errors.txt +++ b/tests/baselines/reference/functionExpressionShadowedByParams.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/functionExpressionShadowedByParams.ts(3,4): error TS2349: Cannot invoke an expression whose type lacks a call signature. +tests/cases/compiler/functionExpressionShadowedByParams.ts(10,9): error TS2339: Property 'apply' does not exist on type 'number'. + + ==== tests/cases/compiler/functionExpressionShadowedByParams.ts (2 errors) ==== function b1(b1: number) { b1.toPrecision(2); // should not error b1(12); // should error ~~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } @@ -12,7 +16,7 @@ b.toPrecision(2); // should not error b.apply(null, null); // should error ~~~~~ -!!! Property 'apply' does not exist on type 'number'. +!!! error TS2339: Property 'apply' does not exist on type 'number'. } }; \ No newline at end of file diff --git a/tests/baselines/reference/functionImplementationErrors.errors.txt b/tests/baselines/reference/functionImplementationErrors.errors.txt index 5c2d678840e..fbae17a609d 100644 --- a/tests/baselines/reference/functionImplementationErrors.errors.txt +++ b/tests/baselines/reference/functionImplementationErrors.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/functions/functionImplementationErrors.ts(2,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(6,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(10,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(16,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(25,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/conformance/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(40,28): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. + + ==== tests/cases/conformance/functions/functionImplementationErrors.ts (8 errors) ==== // FunctionExpression with no return type annotation with multiple return statements with unrelated types var f1 = function () { @@ -8,7 +18,7 @@ ~~~~~~~~~~~~~ }; ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. var f2 = function x() { ~~~~~~~~~~~~~~ return ''; @@ -17,7 +27,7 @@ ~~~~~~~~~~~~~ }; ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. var f3 = () => { ~~~~~~~ return ''; @@ -26,7 +36,7 @@ ~~~~~~~~~~~~~ }; ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. // FunctionExpression with no return type annotation with return branch of number[] and other of string[] var f4 = function () { @@ -43,33 +53,33 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. // Function implemetnation with non -void return type annotation with no return function f5(): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. } var m; // Function signature with parameter initializer referencing in scope local variable function f6(n = m) { ~ -!!! Initializer of parameter 'n' cannot reference identifier 'm' declared after it. +!!! error TS2373: Initializer of parameter 'n' cannot reference identifier 'm' declared after it. var m = 4; } // Function signature with initializer referencing other parameter to the right function f7(n = m, m?) { ~ -!!! Initializer of parameter 'n' cannot reference identifier 'm' declared after it. +!!! error TS2373: Initializer of parameter 'n' cannot reference identifier 'm' declared after it. } // FunctionExpression with non -void return type annotation with a throw, no return, and other code // Should be error but isn't undefined === function (): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. throw undefined; var x = 4; }; diff --git a/tests/baselines/reference/functionNameConflicts.errors.txt b/tests/baselines/reference/functionNameConflicts.errors.txt index 0442a51324b..08a2c5c462d 100644 --- a/tests/baselines/reference/functionNameConflicts.errors.txt +++ b/tests/baselines/reference/functionNameConflicts.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/functions/functionNameConflicts.ts(6,9): error TS2300: Duplicate identifier 'fn1'. +tests/cases/conformance/functions/functionNameConflicts.ts(9,14): error TS2300: Duplicate identifier 'fn2'. +tests/cases/conformance/functions/functionNameConflicts.ts(13,5): error TS2300: Duplicate identifier 'fn3'. +tests/cases/conformance/functions/functionNameConflicts.ts(17,14): error TS2300: Duplicate identifier 'fn4'. +tests/cases/conformance/functions/functionNameConflicts.ts(20,9): error TS2300: Duplicate identifier 'fn5'. +tests/cases/conformance/functions/functionNameConflicts.ts(24,10): error TS2389: Function implementation name must be 'over'. + + ==== tests/cases/conformance/functions/functionNameConflicts.ts (6 errors) ==== //Function and variable of the same name in same declaration space //Function overload with different name from implementation signature @@ -6,35 +14,35 @@ function fn1() { } var fn1; ~~~ -!!! Duplicate identifier 'fn1'. +!!! error TS2300: Duplicate identifier 'fn1'. var fn2; function fn2() { } ~~~ -!!! Duplicate identifier 'fn2'. +!!! error TS2300: Duplicate identifier 'fn2'. } function fn3() { } var fn3; ~~~ -!!! Duplicate identifier 'fn3'. +!!! error TS2300: Duplicate identifier 'fn3'. function func() { var fn4; function fn4() { } ~~~ -!!! Duplicate identifier 'fn4'. +!!! error TS2300: Duplicate identifier 'fn4'. function fn5() { } var fn5; ~~~ -!!! Duplicate identifier 'fn5'. +!!! error TS2300: Duplicate identifier 'fn5'. } function over(); function overrr() { ~~~~~~ -!!! Function implementation name must be 'over'. +!!! error TS2389: Function implementation name must be 'over'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadAmbiguity1.errors.txt b/tests/baselines/reference/functionOverloadAmbiguity1.errors.txt index 7c9eb9482df..75fc140bc68 100644 --- a/tests/baselines/reference/functionOverloadAmbiguity1.errors.txt +++ b/tests/baselines/reference/functionOverloadAmbiguity1.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/functionOverloadAmbiguity1.ts(4,18): error TS2339: Property 'length' does not exist on type 'number'. + + ==== tests/cases/compiler/functionOverloadAmbiguity1.ts (1 errors) ==== function callb(lam: (l: number) => void ); function callb(lam: (n: string) => void ); function callb(a) { } callb((a) => { a.length; } ); // error, chose first overload ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. function callb2(lam: (n: string) => void ); function callb2(lam: (l: number) => void ); diff --git a/tests/baselines/reference/functionOverloadErrors.errors.txt b/tests/baselines/reference/functionOverloadErrors.errors.txt index c2fcff7a943..05fafcb78c1 100644 --- a/tests/baselines/reference/functionOverloadErrors.errors.txt +++ b/tests/baselines/reference/functionOverloadErrors.errors.txt @@ -1,8 +1,24 @@ +tests/cases/conformance/functions/functionOverloadErrors.ts(2,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/functions/functionOverloadErrors.ts(44,25): error TS2304: Cannot find name 'Window'. +tests/cases/conformance/functions/functionOverloadErrors.ts(50,25): error TS2304: Cannot find name 'Window'. +tests/cases/conformance/functions/functionOverloadErrors.ts(51,32): error TS2304: Cannot find name 'window'. +tests/cases/conformance/functions/functionOverloadErrors.ts(65,13): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/functions/functionOverloadErrors.ts(68,13): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/functions/functionOverloadErrors.ts(75,21): error TS2383: Overload signatures must all be exported or not exported. +tests/cases/conformance/functions/functionOverloadErrors.ts(79,14): error TS2383: Overload signatures must all be exported or not exported. +tests/cases/conformance/functions/functionOverloadErrors.ts(85,18): error TS2384: Overload signatures must all be ambient or non-ambient. +tests/cases/conformance/functions/functionOverloadErrors.ts(90,18): error TS2384: Overload signatures must all be ambient or non-ambient. +tests/cases/conformance/functions/functionOverloadErrors.ts(94,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/functions/functionOverloadErrors.ts(99,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/functions/functionOverloadErrors.ts(103,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/functions/functionOverloadErrors.ts(116,19): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + ==== tests/cases/conformance/functions/functionOverloadErrors.ts (14 errors) ==== //Function overload signature with initializer function fn1(x = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function fn1() { } //Multiple function overload signatures that are identical @@ -46,7 +62,7 @@ //Function overloads that differ only by type parameter constraints function fn10(); ~~~~~~ -!!! Cannot find name 'Window'. +!!! error TS2304: Cannot find name 'Window'. function fn10(); function fn10() { } // (actually OK) @@ -54,10 +70,10 @@ //Function overloads that differ only by type parameter constraints where constraints are structually identical function fn11(); ~~~~~~ -!!! Cannot find name 'Window'. +!!! error TS2304: Cannot find name 'Window'. function fn11(); ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. function fn11() { } //Function overloads that differ only by type parameter constraints where constraints include infinitely recursive type reference @@ -73,12 +89,12 @@ public f(); private f(s: string); ~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. f() { } private g(s: string); ~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. public g(); g() { } } @@ -87,13 +103,13 @@ module M { export function fn1(); ~~~ -!!! Overload signatures must all be exported or not exported. +!!! error TS2383: Overload signatures must all be exported or not exported. function fn1(n: string); function fn1() { } function fn2(n: string); ~~~ -!!! Overload signatures must all be exported or not exported. +!!! error TS2383: Overload signatures must all be exported or not exported. export function fn2(); export function fn2() { } } @@ -101,33 +117,33 @@ //Function overloads with differing ambience declare function dfn1(); ~~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. function dfn1(s: string); function dfn1() { } function dfn2(); declare function dfn2(s: string); ~~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. function dfn2() { } //Function overloads with fewer params than implementation signature function fewerParams(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function fewerParams(n: string) { } //Function implementation whose parameter types are not assignable to all corresponding overload signature parameters function fn13(n: string); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function fn13(n: number) { } //Function overloads where return types are not all subtype of implementation return type function fn14(n: string): string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function fn14() { return 3; } @@ -142,6 +158,6 @@ //Function overloads which use initializer expressions function initExpr(n = 13); ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function initExpr() { } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadErrorsSyntax.errors.txt b/tests/baselines/reference/functionOverloadErrorsSyntax.errors.txt index 81f7a63b967..98e7f4cd714 100644 --- a/tests/baselines/reference/functionOverloadErrorsSyntax.errors.txt +++ b/tests/baselines/reference/functionOverloadErrorsSyntax.errors.txt @@ -1,18 +1,23 @@ +tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts(2,27): error TS1016: A required parameter cannot follow an optional parameter. +tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts(5,38): error TS1016: A required parameter cannot follow an optional parameter. +tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts(9,28): error TS1014: A rest parameter must be last in a parameter list. + + ==== tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts (3 errors) ==== //Function overload signature with optional parameter followed by non-optional parameter function fn4a(x?: number, y: string); ~ -!!! A required parameter cannot follow an optional parameter. +!!! error TS1016: A required parameter cannot follow an optional parameter. function fn4a() { } function fn4b(n: string, x?: number, y: string); ~ -!!! A required parameter cannot follow an optional parameter. +!!! error TS1016: A required parameter cannot follow an optional parameter. function fn4b() { } //Function overload signature with rest param followed by non-optional parameter function fn5(x: string, ...y: any[], z: string); ~ -!!! A rest parameter must be last in a parameter list. +!!! error TS1014: A rest parameter must be last in a parameter list. function fn5() { } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName.errors.txt b/tests/baselines/reference/functionOverloadImplementationOfWrongName.errors.txt index 427595d1e05..d1d02f63ccf 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName.errors.txt +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/functionOverloadImplementationOfWrongName.ts(3,10): error TS2389: Function implementation name must be 'foo'. + + ==== tests/cases/compiler/functionOverloadImplementationOfWrongName.ts (1 errors) ==== function foo(x); function foo(x, y); function bar() { } ~~~ -!!! Function implementation name must be 'foo'. \ No newline at end of file +!!! error TS2389: Function implementation name must be 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.errors.txt b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.errors.txt index c656065b375..07826696854 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.errors.txt +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/functionOverloadImplementationOfWrongName2.ts(2,10): error TS2389: Function implementation name must be 'foo'. +tests/cases/compiler/functionOverloadImplementationOfWrongName2.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/functionOverloadImplementationOfWrongName2.ts (2 errors) ==== function foo(x); function bar() { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. function foo(x, y); ~~~ -!!! Function implementation is missing or not immediately following the declaration. \ No newline at end of file +!!! error TS2391: Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads.errors.txt b/tests/baselines/reference/functionOverloads.errors.txt index 1b2e20e5a8d..bd3bab3388b 100644 --- a/tests/baselines/reference/functionOverloads.errors.txt +++ b/tests/baselines/reference/functionOverloads.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/functionOverloads.ts(4,13): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/functionOverloads.ts (1 errors) ==== function foo(): string; function foo(bar: string): number; function foo(bar?: string): any { return "" }; var x = foo(5); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads1.errors.txt b/tests/baselines/reference/functionOverloads1.errors.txt index 610363c772f..1f920c0ecf1 100644 --- a/tests/baselines/reference/functionOverloads1.errors.txt +++ b/tests/baselines/reference/functionOverloads1.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/functionOverloads1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/functionOverloads1.ts (1 errors) ==== function foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. 1+1; function foo():string { return "a" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads11.errors.txt b/tests/baselines/reference/functionOverloads11.errors.txt index a3a8393ec78..18155cbe69f 100644 --- a/tests/baselines/reference/functionOverloads11.errors.txt +++ b/tests/baselines/reference/functionOverloads11.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/functionOverloads11.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/functionOverloads11.ts (1 errors) ==== function foo():number; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads17.errors.txt b/tests/baselines/reference/functionOverloads17.errors.txt index 434cacaeac1..44565702632 100644 --- a/tests/baselines/reference/functionOverloads17.errors.txt +++ b/tests/baselines/reference/functionOverloads17.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/functionOverloads17.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/functionOverloads17.ts (1 errors) ==== function foo():{a:number;} ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo():{a:string;} { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads18.errors.txt b/tests/baselines/reference/functionOverloads18.errors.txt index 9db680de2e2..384c1e3fa8f 100644 --- a/tests/baselines/reference/functionOverloads18.errors.txt +++ b/tests/baselines/reference/functionOverloads18.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/functionOverloads18.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/functionOverloads18.ts (1 errors) ==== function foo(bar:{a:number;}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}) { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads19.errors.txt b/tests/baselines/reference/functionOverloads19.errors.txt index 807a3383c86..4c6935493e9 100644 --- a/tests/baselines/reference/functionOverloads19.errors.txt +++ b/tests/baselines/reference/functionOverloads19.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/functionOverloads19.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/functionOverloads19.ts (1 errors) ==== function foo(bar:{b:string;}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}); function foo(bar:{a:any;}) { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads2.errors.txt b/tests/baselines/reference/functionOverloads2.errors.txt index c0023ab9dcd..85a4a882487 100644 --- a/tests/baselines/reference/functionOverloads2.errors.txt +++ b/tests/baselines/reference/functionOverloads2.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/functionOverloads2.ts(4,13): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. + + ==== tests/cases/compiler/functionOverloads2.ts (1 errors) ==== function foo(bar: string): string; function foo(bar: number): number; function foo(bar: any): any { return bar }; var x = foo(true); ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. \ No newline at end of file +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads20.errors.txt b/tests/baselines/reference/functionOverloads20.errors.txt index 106dde569a8..2a51afefe0c 100644 --- a/tests/baselines/reference/functionOverloads20.errors.txt +++ b/tests/baselines/reference/functionOverloads20.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/functionOverloads20.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/functionOverloads20.ts (1 errors) ==== function foo(bar:{a:number;}): number; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}): string; function foo(bar:{a:any;}): string {return ""} \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads22.errors.txt b/tests/baselines/reference/functionOverloads22.errors.txt index e091094f01e..bc075e0c3ef 100644 --- a/tests/baselines/reference/functionOverloads22.errors.txt +++ b/tests/baselines/reference/functionOverloads22.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/functionOverloads22.ts(2,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/functionOverloads22.ts (1 errors) ==== function foo(bar:number):{a:number;}[]; function foo(bar:string):{a:number; b:string;}[]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:any):{a:any;b?:any;}[] { return [{a:""}] } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads27.errors.txt b/tests/baselines/reference/functionOverloads27.errors.txt index 35216e2fe42..a5d16935f2f 100644 --- a/tests/baselines/reference/functionOverloads27.errors.txt +++ b/tests/baselines/reference/functionOverloads27.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/functionOverloads27.ts(4,13): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/functionOverloads27.ts (1 errors) ==== function foo():string; function foo(bar:string):number; function foo(bar?:any):any{ return '' } var x = foo(5); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads29.errors.txt b/tests/baselines/reference/functionOverloads29.errors.txt index 510d9c4575f..763405e351b 100644 --- a/tests/baselines/reference/functionOverloads29.errors.txt +++ b/tests/baselines/reference/functionOverloads29.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/functionOverloads29.ts(4,9): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/functionOverloads29.ts (1 errors) ==== function foo(bar:string):string; function foo(bar:number):number; function foo(bar:any):any{ return bar } var x = foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads3.errors.txt b/tests/baselines/reference/functionOverloads3.errors.txt index b153d81c109..1f02b0fbc47 100644 --- a/tests/baselines/reference/functionOverloads3.errors.txt +++ b/tests/baselines/reference/functionOverloads3.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/functionOverloads3.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/functionOverloads3.ts (1 errors) ==== function foo():string; ~~~ -!!! Function implementation is missing or not immediately following the declaration. \ No newline at end of file +!!! error TS2391: Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads34.errors.txt b/tests/baselines/reference/functionOverloads34.errors.txt index 6dc7b45c3d2..ccd771d2130 100644 --- a/tests/baselines/reference/functionOverloads34.errors.txt +++ b/tests/baselines/reference/functionOverloads34.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/functionOverloads34.ts(4,9): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/functionOverloads34.ts (1 errors) ==== function foo(bar:{a:number;}):string; function foo(bar:{a:boolean;}):number; function foo(bar:{a:any;}):any{ return bar } var x = foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads37.errors.txt b/tests/baselines/reference/functionOverloads37.errors.txt index 0e93e7a459b..742e1bedb22 100644 --- a/tests/baselines/reference/functionOverloads37.errors.txt +++ b/tests/baselines/reference/functionOverloads37.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/functionOverloads37.ts(4,9): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/functionOverloads37.ts (1 errors) ==== function foo(bar:{a:number;}[]):string; function foo(bar:{a:boolean;}[]):number; function foo(bar:{a:any;}[]):any{ return bar } var x = foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads4.errors.txt b/tests/baselines/reference/functionOverloads4.errors.txt index 3ec1a19dd35..1e41fde6021 100644 --- a/tests/baselines/reference/functionOverloads4.errors.txt +++ b/tests/baselines/reference/functionOverloads4.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/functionOverloads4.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/functionOverloads4.ts (1 errors) ==== function foo():number; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "a" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads40.errors.txt b/tests/baselines/reference/functionOverloads40.errors.txt index 94e9ccc9ab2..cf23d39c108 100644 --- a/tests/baselines/reference/functionOverloads40.errors.txt +++ b/tests/baselines/reference/functionOverloads40.errors.txt @@ -1,11 +1,17 @@ +tests/cases/compiler/functionOverloads40.ts(4,13): error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. + Type '{ a: string; }' is not assignable to type '{ a: boolean; }': + Types of property 'a' are incompatible: + Type 'string' is not assignable to type 'boolean'. + + ==== tests/cases/compiler/functionOverloads40.ts (1 errors) ==== function foo(bar:{a:number;}[]):string; function foo(bar:{a:boolean;}[]):number; function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{a:'bar'}]); ~~~~~~~~~~~ -!!! Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! Type '{ a: string; }' is not assignable to type '{ a: boolean; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. +!!! error TS2345: Type '{ a: string; }' is not assignable to type '{ a: boolean; }': +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads41.errors.txt b/tests/baselines/reference/functionOverloads41.errors.txt index 5d84364f8d2..47b1e031133 100644 --- a/tests/baselines/reference/functionOverloads41.errors.txt +++ b/tests/baselines/reference/functionOverloads41.errors.txt @@ -1,10 +1,15 @@ +tests/cases/compiler/functionOverloads41.ts(4,13): error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ a: boolean; }[]'. + Type '{}' is not assignable to type '{ a: boolean; }': + Property 'a' is missing in type '{}'. + + ==== tests/cases/compiler/functionOverloads41.ts (1 errors) ==== function foo(bar:{a:number;}[]):string; function foo(bar:{a:boolean;}[]):number; function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{}]); ~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! Type '{}' is not assignable to type '{ a: boolean; }': -!!! Property 'a' is missing in type '{}'. +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ a: boolean; }[]'. +!!! error TS2345: Type '{}' is not assignable to type '{ a: boolean; }': +!!! error TS2345: Property 'a' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads5.errors.txt b/tests/baselines/reference/functionOverloads5.errors.txt index a73fb152a0e..8c5639b87e4 100644 --- a/tests/baselines/reference/functionOverloads5.errors.txt +++ b/tests/baselines/reference/functionOverloads5.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/functionOverloads5.ts(2,10): error TS2385: Overload signatures must all be public or private. + + ==== tests/cases/compiler/functionOverloads5.ts (1 errors) ==== class baz { public foo(); ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private foo(bar?:any){ } } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadsOutOfOrder.errors.txt b/tests/baselines/reference/functionOverloadsOutOfOrder.errors.txt index c5cfcb2ac73..8aab3d3e387 100644 --- a/tests/baselines/reference/functionOverloadsOutOfOrder.errors.txt +++ b/tests/baselines/reference/functionOverloadsOutOfOrder.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/functionOverloadsOutOfOrder.ts(6,13): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/compiler/functionOverloadsOutOfOrder.ts(14,13): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/functionOverloadsOutOfOrder.ts (2 errors) ==== class d { private foo(n: number): string; @@ -6,7 +10,7 @@ } private foo(s: string): string; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } class e { @@ -16,5 +20,5 @@ private foo(s: string): string; private foo(n: number): string; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt index 7d7a66e42b1..f731a2e7bba 100644 --- a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,5): error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc': + Types of parameters 'delimiter' and 'eventEmitter' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/functionSignatureAssignmentCompat1.ts (1 errors) ==== interface ParserFunc { (eventEmitter: number, buffer: string): void; @@ -10,7 +15,7 @@ var c: ParserFunc = parsers.raw; // ok! var d: ParserFunc = parsers.readline; // not ok ~ -!!! Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc': -!!! Types of parameters 'delimiter' and 'eventEmitter' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc': +!!! error TS2322: Types of parameters 'delimiter' and 'eventEmitter' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var e: ParserFunc = parsers.readline(); // ok \ No newline at end of file diff --git a/tests/baselines/reference/functionTypeArgumentArrayAssignment.errors.txt b/tests/baselines/reference/functionTypeArgumentArrayAssignment.errors.txt index d6c22626604..9897286a624 100644 --- a/tests/baselines/reference/functionTypeArgumentArrayAssignment.errors.txt +++ b/tests/baselines/reference/functionTypeArgumentArrayAssignment.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/functionTypeArgumentArrayAssignment.ts(3,2): error TS2300: Duplicate identifier 'length'. + + ==== tests/cases/compiler/functionTypeArgumentArrayAssignment.ts (1 errors) ==== interface Array { foo: T; length: number; ~~~~~~ -!!! Duplicate identifier 'length'. +!!! error TS2300: Duplicate identifier 'length'. } function map() { diff --git a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt index a7c07b9de77..366e1732b29 100644 --- a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt +++ b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts(12,1): error TS2304: Cannot find name 'console'. + + ==== tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts (1 errors) ==== var f : { (x:T): T; @@ -12,5 +15,5 @@ console.log(s); ~~~~~~~ -!!! Cannot find name 'console'. +!!! error TS2304: Cannot find name 'console'. \ No newline at end of file diff --git a/tests/baselines/reference/functionTypesLackingReturnTypes.errors.txt b/tests/baselines/reference/functionTypesLackingReturnTypes.errors.txt new file mode 100644 index 00000000000..a0be6f32df0 --- /dev/null +++ b/tests/baselines/reference/functionTypesLackingReturnTypes.errors.txt @@ -0,0 +1,22 @@ +tests/cases/compiler/functionTypesLackingReturnTypes.ts(3,17): error TS1005: '=>' expected. +tests/cases/compiler/functionTypesLackingReturnTypes.ts(7,15): error TS1005: '=>' expected. + + +==== tests/cases/compiler/functionTypesLackingReturnTypes.ts (2 errors) ==== + + // Error (no '=>') + function f(x: ()) { + ~ +!!! error TS1005: '=>' expected. + } + + // Error (no '=>') + var g: (param); + ~ +!!! error TS1005: '=>' expected. + + // Okay + var h: { () } + + // Okay + var i: { new () } \ No newline at end of file diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt b/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt index d599e2da445..d9a25e24566 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt +++ b/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt @@ -1,3 +1,14 @@ +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(4,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(12,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(22,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(31,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(43,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(48,1): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(56,1): 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 (9 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 @@ -16,7 +27,7 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f2() { ~~~~~~~~~~~~~~~ @@ -36,7 +47,7 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f3() { ~~~~~~~~~~~~~~~ @@ -54,7 +65,7 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f4() { ~~~~~~~~~~~~~~~ @@ -78,7 +89,7 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f5() { ~~~~~~~~~~~~~~~ @@ -88,7 +99,7 @@ ~~~~~~~~~~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f6(x: T, y:U) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -104,14 +115,14 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f8(x: T, y: U) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. if (true) { ~~~~~~~~~~~~~~~ return x; @@ -124,5 +135,5 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. \ No newline at end of file diff --git a/tests/baselines/reference/functionWithSameNameAsField.errors.txt b/tests/baselines/reference/functionWithSameNameAsField.errors.txt index ce69b7feb56..e1ba390cf94 100644 --- a/tests/baselines/reference/functionWithSameNameAsField.errors.txt +++ b/tests/baselines/reference/functionWithSameNameAsField.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/functionWithSameNameAsField.ts(3,12): error TS2300: Duplicate identifier 'total'. + + ==== tests/cases/compiler/functionWithSameNameAsField.ts (1 errors) ==== class TestProgressBar { public total: number; public total(total: number) { ~~~~~ -!!! Duplicate identifier 'total'. +!!! error TS2300: Duplicate identifier 'total'. this.total = total; return this; } diff --git a/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt b/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt index b354a9f8852..72f45da8d97 100644 --- a/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt +++ b/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/functionWithThrowButNoReturn1.ts(1,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. + + ==== tests/cases/compiler/functionWithThrowButNoReturn1.ts (1 errors) ==== function fn(): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. throw new Error('NYI'); var t; } diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt index 6ddbc91db57..11ceb2aa3dd 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt @@ -1,8 +1,15 @@ +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(117,5): error TS1003: Identifier expected. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(2,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(64,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(94,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(112,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + + ==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (5 errors) ==== function f1(): string { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. // errors because there are no return statements } @@ -66,7 +73,7 @@ function f14(): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. // Not fine, since we can *only* consist of a single throw statement // if no return statements are present but we are annotated. throw undefined; @@ -98,7 +105,7 @@ class C { public get m1() { ~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. // Errors; get accessors must return a value. } @@ -118,12 +125,12 @@ public get m5() { ~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. // Not fine, since we can *only* consist of a single throw statement // if no return statements are present but we are a get accessor. throw null; throw undefined. } ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. } \ No newline at end of file diff --git a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt index 2d70aed4a3e..1fc68fff709 100644 --- a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged + + ==== tests/cases/compiler/funduleSplitAcrossFiles_function.ts (0 errors) ==== function D() { } ==== tests/cases/compiler/funduleSplitAcrossFiles_module.ts (1 errors) ==== module D { ~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/baselines/reference/fuzzy.errors.txt b/tests/baselines/reference/fuzzy.errors.txt index 36124da5cea..321a03f5470 100644 --- a/tests/baselines/reference/fuzzy.errors.txt +++ b/tests/baselines/reference/fuzzy.errors.txt @@ -1,3 +1,12 @@ +tests/cases/compiler/fuzzy.ts(13,18): error TS2421: Class 'C' incorrectly implements interface 'I': + Property 'alsoWorks' is missing in type 'C'. +tests/cases/compiler/fuzzy.ts(21,20): error TS2322: Type '{ anything: number; oneI: C; }' is not assignable to type 'R': + Types of property 'oneI' are incompatible: + Type 'C' is not assignable to type 'I'. +tests/cases/compiler/fuzzy.ts(25,20): error TS2353: Neither type '{ oneI: C; }' nor type 'R' is assignable to the other: + Property 'anything' is missing in type '{ oneI: C; }'. + + ==== tests/cases/compiler/fuzzy.ts (3 errors) ==== module M { export interface I { @@ -13,8 +22,8 @@ export class C implements I { ~ -!!! Class 'C' incorrectly implements interface 'I': -!!! Property 'alsoWorks' is missing in type 'C'. +!!! error TS2421: Class 'C' incorrectly implements interface 'I': +!!! error TS2421: Property 'alsoWorks' is missing in type 'C'. constructor(public x:number) { } works():R { @@ -24,16 +33,16 @@ doesntWork():R { return { anything:1, oneI:this }; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type '{ anything: number; oneI: C; }' is not assignable to type 'R': -!!! Types of property 'oneI' are incompatible: -!!! Type 'C' is not assignable to type 'I'. +!!! error TS2322: Type '{ anything: number; oneI: C; }' is not assignable to type 'R': +!!! error TS2322: Types of property 'oneI' are incompatible: +!!! error TS2322: Type 'C' is not assignable to type 'I'. } worksToo():R { return ({ oneI: this }); ~~~~~~~~~~~~~~~~~~~ -!!! Neither type '{ oneI: C; }' nor type 'R' is assignable to the other: -!!! Property 'anything' is missing in type '{ oneI: C; }'. +!!! error TS2353: Neither type '{ oneI: C; }' nor type 'R' is assignable to the other: +!!! error TS2353: Property 'anything' is missing in type '{ oneI: C; }'. } } } diff --git a/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt b/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt index d07bbe81e1e..4c3245b11f7 100644 --- a/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt +++ b/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(7,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(16,15): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(40,22): error TS2428: All declarations of an interface must have identical type parameters. + + ==== tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts (3 errors) ==== // generic and non-generic interfaces with the same name do not merge @@ -7,7 +12,7 @@ interface A { // error ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. bar: T; } @@ -18,7 +23,7 @@ interface A { // error ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. foo: string; } } @@ -44,7 +49,7 @@ module M3 { export interface A { // error ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. bar: T; } } \ No newline at end of file diff --git a/tests/baselines/reference/genericArrayAssignment1.errors.txt b/tests/baselines/reference/genericArrayAssignment1.errors.txt index 1b8d6cb2aab..c0ffc6e1901 100644 --- a/tests/baselines/reference/genericArrayAssignment1.errors.txt +++ b/tests/baselines/reference/genericArrayAssignment1.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/genericArrayAssignment1.ts(4,1): error TS2322: Type 'number[]' is not assignable to type 'string[]': + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/genericArrayAssignment1.ts (1 errors) ==== var s: string[]; var n: number[]; s = n; ~ -!!! Type 'number[]' is not assignable to type 'string[]': -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number[]' is not assignable to type 'string[]': +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericArrayAssignmentCompatErrors.errors.txt b/tests/baselines/reference/genericArrayAssignmentCompatErrors.errors.txt index e57112cf0fa..02ac17bb10c 100644 --- a/tests/baselines/reference/genericArrayAssignmentCompatErrors.errors.txt +++ b/tests/baselines/reference/genericArrayAssignmentCompatErrors.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/genericArrayAssignmentCompatErrors.ts(2,15): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/genericArrayAssignmentCompatErrors.ts(4,14): error TS2314: Generic type 'Array' requires 1 type argument(s). + + ==== tests/cases/compiler/genericArrayAssignmentCompatErrors.ts (2 errors) ==== var myCars=new Array(); var myCars2 = new []; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var myCars3 = new Array({}); var myCars4: Array; // error ~~~~~ -!!! Generic type 'Array' requires 1 type argument(s). +!!! error TS2314: Generic type 'Array' requires 1 type argument(s). var myCars5: Array[]; myCars = myCars2; diff --git a/tests/baselines/reference/genericArrayExtenstions.errors.txt b/tests/baselines/reference/genericArrayExtenstions.errors.txt index c13b637a392..d5ba57ddb55 100644 --- a/tests/baselines/reference/genericArrayExtenstions.errors.txt +++ b/tests/baselines/reference/genericArrayExtenstions.errors.txt @@ -1,10 +1,15 @@ +tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2421: Class 'ObservableArray' incorrectly implements interface 'T[]': + Property 'length' is missing in type 'ObservableArray'. + + ==== tests/cases/compiler/genericArrayExtenstions.ts (2 errors) ==== export declare class ObservableArray implements Array { // MS.Entertainment.ObservableArray ~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~~~~~ -!!! Class 'ObservableArray' incorrectly implements interface 'T[]': -!!! Property 'length' is missing in type 'ObservableArray'. +!!! error TS2421: Class 'ObservableArray' incorrectly implements interface 'T[]': +!!! error TS2421: Property 'length' is missing in type 'ObservableArray'. concat(...items: U[]): T[]; concat(...items: T[]): T[]; } diff --git a/tests/baselines/reference/genericArrayMethods1.errors.txt b/tests/baselines/reference/genericArrayMethods1.errors.txt index 669fa926c26..9b037155e33 100644 --- a/tests/baselines/reference/genericArrayMethods1.errors.txt +++ b/tests/baselines/reference/genericArrayMethods1.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/genericArrayMethods1.ts(1,5): error TS2322: Type 'number[]' is not assignable to type 'string[]': + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/genericArrayMethods1.ts (1 errors) ==== var x:string[] = [0,1].slice(0); // this should be an error ~ -!!! Type 'number[]' is not assignable to type 'string[]': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number[]' is not assignable to type 'string[]': +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericArrayWithoutTypeAnnotation.errors.txt b/tests/baselines/reference/genericArrayWithoutTypeAnnotation.errors.txt index 7cec6a532a4..dcb0de1cbb5 100644 --- a/tests/baselines/reference/genericArrayWithoutTypeAnnotation.errors.txt +++ b/tests/baselines/reference/genericArrayWithoutTypeAnnotation.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/genericArrayWithoutTypeAnnotation.ts(4,24): error TS2314: Generic type 'IFoo' requires 1 type argument(s). + + ==== tests/cases/compiler/genericArrayWithoutTypeAnnotation.ts (1 errors) ==== interface IFoo{ } class Bar { public getBar(foo: IFoo[]) { ~~~~ -!!! Generic type 'IFoo' requires 1 type argument(s). +!!! error TS2314: Generic type 'IFoo' requires 1 type argument(s). } } \ No newline at end of file diff --git a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt index ad664c5c5b8..2ff34413595 100644 --- a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt +++ b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts(1,27): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts(2,27): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts (2 errors) ==== var x1 = function foo3(x: T, z: U) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var x2 = function foo3(x: T, z: U) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x1 = x2; x2 = x1; \ No newline at end of file diff --git a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt index 8bd0c913128..8fea5ddfa72 100644 --- a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt +++ b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt @@ -1,3 +1,33 @@ +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(12,5): error TS2322: Type '{ x: A; }' is not assignable to type 'I': + Types of property 'x' are incompatible: + Type 'A' is not assignable to type 'Comparable': + Types of property 'compareTo' are incompatible: + Type '(other: number) => number' is not assignable to type '(other: string) => number': + Types of parameters 'other' and 'other' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(13,5): error TS2322: Type '{ x: A; }' is not assignable to type 'I': + Types of property 'x' are incompatible: + Type 'A' is not assignable to type 'Comparable': + Types of property 'compareTo' are incompatible: + Type '(other: number) => number' is not assignable to type '(other: string) => number': + Types of parameters 'other' and 'other' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(16,5): error TS2322: Type '{ x: A; }' is not assignable to type 'I': + Types of property 'x' are incompatible: + Type 'A' is not assignable to type 'Comparable': + Types of property 'compareTo' are incompatible: + Type '(other: number) => number' is not assignable to type '(other: string) => number': + Types of parameters 'other' and 'other' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(17,5): error TS2322: Type 'K' is not assignable to type 'I': + Types of property 'x' are incompatible: + Type 'A' is not assignable to type 'Comparable': + Types of property 'compareTo' are incompatible: + Type '(other: number) => number' is not assignable to type '(other: string) => number': + Types of parameters 'other' and 'other' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts (4 errors) ==== interface Comparable { compareTo(other: T): number; @@ -12,41 +42,41 @@ var z = { x: new A() }; var a1: I = { x: new A() }; ~~ -!!! Type '{ x: A; }' is not assignable to type 'I': -!!! Types of property 'x' are incompatible: -!!! Type 'A' is not assignable to type 'Comparable': -!!! Types of property 'compareTo' are incompatible: -!!! Type '(other: number) => number' is not assignable to type '(other: string) => number': -!!! Types of parameters 'other' and 'other' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'Comparable': +!!! error TS2322: Types of property 'compareTo' are incompatible: +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number': +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var a2: I = function (): { x: A } { ~~ -!!! Type '{ x: A; }' is not assignable to type 'I': -!!! Types of property 'x' are incompatible: -!!! Type 'A' is not assignable to type 'Comparable': -!!! Types of property 'compareTo' are incompatible: -!!! Type '(other: number) => number' is not assignable to type '(other: string) => number': -!!! Types of parameters 'other' and 'other' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'Comparable': +!!! error TS2322: Types of property 'compareTo' are incompatible: +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number': +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var z = { x: new A() }; return z; } (); var a3: I = z; ~~ -!!! Type '{ x: A; }' is not assignable to type 'I': -!!! Types of property 'x' are incompatible: -!!! Type 'A' is not assignable to type 'Comparable': -!!! Types of property 'compareTo' are incompatible: -!!! Type '(other: number) => number' is not assignable to type '(other: string) => number': -!!! Types of parameters 'other' and 'other' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'Comparable': +!!! error TS2322: Types of property 'compareTo' are incompatible: +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number': +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var a4: I = >z; ~~ -!!! Type 'K' is not assignable to type 'I': -!!! Types of property 'x' are incompatible: -!!! Type 'A' is not assignable to type 'Comparable': -!!! Types of property 'compareTo' are incompatible: -!!! Type '(other: number) => number' is not assignable to type '(other: string) => number': -!!! Types of parameters 'other' and 'other' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'K' is not assignable to type 'I': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'Comparable': +!!! error TS2322: Types of property 'compareTo' are incompatible: +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number': +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallSpecializedToTypeArg.errors.txt b/tests/baselines/reference/genericCallSpecializedToTypeArg.errors.txt index 40d523e01e1..4deec14741c 100644 --- a/tests/baselines/reference/genericCallSpecializedToTypeArg.errors.txt +++ b/tests/baselines/reference/genericCallSpecializedToTypeArg.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericCallSpecializedToTypeArg.ts(6,5): error TS2339: Property 'getDist' does not exist on type 'U'. + + ==== tests/cases/compiler/genericCallSpecializedToTypeArg.ts (1 errors) ==== function dupe(x: T): T { return x; @@ -6,7 +9,7 @@ var y = dupe(x); //<-- dupe has incorrect type here y.getDist(); //<-- this requires a missing constraint, but it's not caught ~~~~~~~ -!!! Property 'getDist' does not exist on type 'U'. +!!! error TS2339: Property 'getDist' does not exist on type 'U'. return y; } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt index 6d829215cd2..604896319ca 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt @@ -1,9 +1,13 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts(3,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts(11,26): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Date'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts (2 errors) ==== // Generic call with parameters of T and U, U extends T, no parameter of type U function foo(t: T) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var u: U; return u; } @@ -13,5 +17,5 @@ var r3 = foo(new Object()); // {} var r4 = foo(1); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Date'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Date'. var r5 = foo(new Date()); // no error \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt index c92110911ab..48e615bdb3e 100644 --- a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(11,14): error TS2345: Argument of type '{ cb: new (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(13,14): error TS2345: Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts (2 errors) ==== // Generic call with parameter of object type with member of function type of n args passed object whose associated member is call signature with n+1 args @@ -11,11 +15,11 @@ var arg2: { cb: new (x: T, y: T) => string }; var r2 = foo(arg2); // error ~~~~ -!!! Argument of type '{ cb: new (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'. +!!! error TS2345: Argument of type '{ cb: new (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'. var arg3: { cb: new (x: string, y: number) => string }; var r3 = foo(arg3); // error ~~~~ -!!! Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'. +!!! error TS2345: Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'. function foo2(arg: { cb: new(t: T, t2: T) => U }) { return new arg.cb(null, null); diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt index 8de5453e2af..d5084fbee40 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts(10,14): error TS2345: Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'. + Types of property 'cb' are incompatible: + Type '(x: T, y: T) => string' is not assignable to type '(t: {}) => string'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts(11,14): error TS2345: Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. + Types of property 'cb' are incompatible: + Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts (2 errors) ==== // Generic call with parameter of object type with member of function type of n args passed object whose associated member is call signature with n+1 args @@ -10,14 +18,14 @@ // more args not allowed var r2 = foo({ cb: (x: T, y: T) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'. -!!! Types of property 'cb' are incompatible: -!!! Type '(x: T, y: T) => string' is not assignable to type '(t: {}) => string'. +!!! error TS2345: Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'. +!!! error TS2345: Types of property 'cb' are incompatible: +!!! error TS2345: Type '(x: T, y: T) => string' is not assignable to type '(t: {}) => string'. var r3 = foo({ cb: (x: string, y: number) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. -!!! Types of property 'cb' are incompatible: -!!! Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. +!!! error TS2345: Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. +!!! error TS2345: Types of property 'cb' are incompatible: +!!! error TS2345: Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. function foo2(arg: { cb: (t: T, t2: T) => U }) { return arg.cb(null, null); diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt index 9396e3f2de9..7f4fa26aad1 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(14,17): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(15,18): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(24,19): error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(36,32): error TS2345: Argument of type '(x: E) => F' is not assignable to parameter of type '(x: E) => E'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts (4 errors) ==== // When a function expression is inferentially typed (section 4.9.3) and a type assigned to a parameter in that expression references type parameters for which inferences are being made, // the corresponding inferred type arguments to become fixed and no further candidate inferences are made for them. @@ -14,10 +20,10 @@ // BUG 835518 var r9 = r7(new Date()); // should be ok ~~~~~~~~~~ -!!! Argument of type 'Date' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. var r10 = r7(1); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. } function foo2(a: (x: T) => T, b: (x: T) => T) { @@ -28,7 +34,7 @@ function other3(x: T) { var r7 = foo2((a: T) => a, (b: T) => b); // error ~~~~~~~~~~~ -!!! Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'. +!!! error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'. var r7b = foo2((a) => a, (b) => b); // valid, T is inferred to be Date } @@ -42,4 +48,4 @@ var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error ~~~~~~~~~~ -!!! Argument of type '(x: E) => F' is not assignable to parameter of type '(x: E) => E'. \ No newline at end of file +!!! error TS2345: Argument of type '(x: E) => F' is not assignable to parameter of type '(x: E) => E'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt index 9551a712b75..3b3f8d43ff9 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt @@ -1,24 +1,38 @@ +tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(4,22): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. + Types of property 'y' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(5,22): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: string; y: string; }'. + Types of property 'x' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(6,22): error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: number; y: number; }'. + Types of property 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(7,22): error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: string; y: string; }'. + Types of property 'y' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts (4 errors) ==== function foo(n: { x: T; y: T }, m: T) { return m; } var x = foo({ x: 3, y: "" }, 4); // no error, x is Object, the best common type // these are all errors var x2 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ -!!! Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. -!!! Types of property 'y' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. +!!! error TS2345: Types of property 'y' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'number'. var x3 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ -!!! Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: string; y: string; }'. -!!! Types of property 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: string; y: string; }'. +!!! error TS2345: Types of property 'x' are incompatible: +!!! error TS2345: Type 'number' is not assignable to type 'string'. var x4 = foo({ x: "", y: 4 }, ""); ~~~~~~~~~~~~~~~ -!!! Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: number; y: number; }'. -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: number; y: number; }'. +!!! error TS2345: Types of property 'x' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'number'. var x5 = foo({ x: "", y: 4 }, ""); ~~~~~~~~~~~~~~~ -!!! Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: string; y: string; }'. -!!! Types of property 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: string; y: string; }'. +!!! error TS2345: Types of property 'y' are incompatible: +!!! error TS2345: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt index 6ac5e2234ef..c41ca0e8875 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(20,29): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts (1 errors) ==== // Generic call with constraints infering type parameter from object member properties @@ -20,7 +23,7 @@ function f2(a: U) { ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var r: T; return r; } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt index 4d306264e7d..5f416bb8596 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts(12,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts(28,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts(30,24): error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts (3 errors) ==== // Generic call with constraints infering type parameter from object member properties @@ -12,7 +17,7 @@ function foo(t: T, t2: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return (x: T) => t2; } @@ -30,11 +35,11 @@ function other() { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var r4 = foo(c, d); var r5 = foo(c, d); // error ~ -!!! Argument of type 'C' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt index 1b619f5ce7a..887abfaff63 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts(12,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts(21,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts(22,24): error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts (3 errors) ==== // Generic call with constraints infering type parameter from object member properties @@ -12,7 +17,7 @@ function foo(t: T, t2: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return (x: T) => t2; } @@ -23,9 +28,9 @@ function other() { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var r5 = foo(c, d); // error ~ -!!! Argument of type 'C' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt index 3df159e7ce0..ec1f654863f 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(15,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(18,9): error TS2413: Numeric index type 'T' is not assignable to string index type 'Object'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(23,9): error TS2323: Type 'T' is not assignable to type 'U'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts (3 errors) ==== // Type inference infers from indexers in target type, error cases @@ -15,17 +20,17 @@ function other3(arg: T) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b: { [x: string]: Object; [x: number]: T; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'T' is not assignable to string index type 'Object'. +!!! error TS2413: Numeric index type 'T' is not assignable to string index type 'Object'. }; var r2 = foo(b); var d = r2[1]; var e = r2['1']; var u: U = r2[1]; // ok ~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt index 880e0895c32..45a64e62e5e 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt @@ -1,3 +1,16 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2323: Type 'number' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,37): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(7,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(7,37): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,31): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,56): error TS2323: Type 'U' is not assignable to type 'V'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,31): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,50): error TS2323: Type 'V' is not assignable to type 'U'. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts (11 errors) ==== // Generic typed parameters with initializers @@ -5,28 +18,28 @@ function foo2(x: T = undefined) { return x; } // ok function foo3(x: T = 1) { } // error ~~~~~~~~ -!!! Type 'number' is not assignable to type 'T'. +!!! error TS2323: Type 'number' is not assignable to type 'T'. function foo4(x: T, y: U = x) { } // error ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. function foo5(x: U, y: T = x) { } // ok ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! Type 'U' is not assignable to type 'T'. +!!! error TS2323: Type 'U' is not assignable to type 'T'. function foo6(x: T, y: U, z: V = y) { } // error ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! Type 'U' is not assignable to type 'V'. +!!! error TS2323: Type 'U' is not assignable to type 'V'. function foo7(x: V, y: U = x) { } // should be ok ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! Type 'V' is not assignable to type 'U'. \ No newline at end of file +!!! error TS2323: Type 'V' is not assignable to type 'U'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt index 04756285abf..80bcf12494a 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts(31,20): error TS2345: Argument of type 'new (x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts (1 errors) ==== // Function typed arguments with multiple signatures must be passed an implementation that matches all of them // Inferences are made quadratic-pairwise to and from these overload sets @@ -31,7 +34,7 @@ var b: { new (x: T, y: T): string }; var r10 = foo6(b); // error ~ -!!! Argument of type 'new (x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'. +!!! error TS2345: Argument of type 'new (x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'. function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { return cb; diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt index 7028f0cf38e..32fe6a09344 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts(28,20): error TS2345: Argument of type '(x: T, y: T) => string' is not assignable to parameter of type '{ (x: any): string; (x: any, y?: any): string; }'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts (1 errors) ==== // Function typed arguments with multiple signatures must be passed an implementation that matches all of them // Inferences are made quadratic-pairwise to and from these overload sets @@ -28,7 +31,7 @@ var r10 = foo6((x: T, y: T) => ''); // error ~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: T, y: T) => string' is not assignable to parameter of type '{ (x: any): string; (x: any, y?: any): string; }'. +!!! error TS2345: Argument of type '(x: T, y: T) => string' is not assignable to parameter of type '{ (x: any): string; (x: any, y?: any): string; }'. function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { return cb; diff --git a/tests/baselines/reference/genericCallWithoutArgs.errors.txt b/tests/baselines/reference/genericCallWithoutArgs.errors.txt index 5756cc000d2..390fad31389 100644 --- a/tests/baselines/reference/genericCallWithoutArgs.errors.txt +++ b/tests/baselines/reference/genericCallWithoutArgs.errors.txt @@ -1,13 +1,19 @@ +tests/cases/compiler/genericCallWithoutArgs.ts(4,17): error TS1109: Expression expected. +tests/cases/compiler/genericCallWithoutArgs.ts(4,18): error TS1003: Identifier expected. +tests/cases/compiler/genericCallWithoutArgs.ts(4,3): error TS2304: Cannot find name 'number'. +tests/cases/compiler/genericCallWithoutArgs.ts(4,10): error TS2304: Cannot find name 'string'. + + ==== tests/cases/compiler/genericCallWithoutArgs.ts (4 errors) ==== function f(x: X, y: Y) { } f. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. ~~~~~~ -!!! Cannot find name 'string'. \ No newline at end of file +!!! error TS2304: Cannot find name 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt b/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt index ca5fd616422..af5d92f4e3c 100644 --- a/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt +++ b/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt @@ -1,33 +1,43 @@ +tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(2,14): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(3,16): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. +tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(4,14): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(8,15): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(9,15): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(12,17): error TS2345: Argument of type 'U' is not assignable to parameter of type 'T'. +tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(13,15): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(14,15): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts (8 errors) ==== function foo(x:T, y:U, f: (v: T) => U) { var r1 = f(1); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2 = f(1); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. var r3 = f(null); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r4 = f(null); var r11 = f(x); var r21 = f(x); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r31 = f(null); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r41 = f(null); var r12 = f(y); ~ -!!! Argument of type 'U' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'U' is not assignable to parameter of type 'T'. var r22 = f(y); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r32 = f(null); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r42 = f(null); } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallsWithoutParens.errors.txt b/tests/baselines/reference/genericCallsWithoutParens.errors.txt index bfce0d2bf22..aba66ed545f 100644 --- a/tests/baselines/reference/genericCallsWithoutParens.errors.txt +++ b/tests/baselines/reference/genericCallsWithoutParens.errors.txt @@ -1,18 +1,24 @@ +tests/cases/compiler/genericCallsWithoutParens.ts(2,18): error TS1109: Expression expected. +tests/cases/compiler/genericCallsWithoutParens.ts(7,22): error TS1109: Expression expected. +tests/cases/compiler/genericCallsWithoutParens.ts(2,11): error TS2304: Cannot find name 'number'. +tests/cases/compiler/genericCallsWithoutParens.ts(7,15): error TS2304: Cannot find name 'number'. + + ==== tests/cases/compiler/genericCallsWithoutParens.ts (4 errors) ==== function f() { } var r = f; // parse error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. class C { foo: T; } var c = new C; // parse error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericChainedCalls.errors.txt b/tests/baselines/reference/genericChainedCalls.errors.txt index 96ef5a3340f..6d8a3e6831c 100644 --- a/tests/baselines/reference/genericChainedCalls.errors.txt +++ b/tests/baselines/reference/genericChainedCalls.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericChainedCalls.ts(8,29): error TS2339: Property 'length' does not exist on type 'number'. +tests/cases/compiler/genericChainedCalls.ts(12,29): error TS2339: Property 'length' does not exist on type 'number'. + + ==== tests/cases/compiler/genericChainedCalls.ts (2 errors) ==== interface I1 { func(callback: (value: T) => U): I1; @@ -8,12 +12,12 @@ var r1 = v1.func(num => num.toString()) .func(str => str.length) // error, number doesn't have a length ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. .func(num => num.toString()) var s1 = v1.func(num => num.toString()) var s2 = s1.func(str => str.length) // should also error ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. var s3 = s2.func(num => num.toString()) \ No newline at end of file diff --git a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.errors.txt b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.errors.txt index 588e70eb39e..076a5064bab 100644 --- a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.errors.txt +++ b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.errors.txt @@ -1,31 +1,40 @@ +tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts(3,20): error TS2302: Static members cannot reference class type parameters. +tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts(5,15): error TS2302: Static members cannot reference class type parameters. +tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts(7,15): error TS2302: Static members cannot reference class type parameters. +tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts(9,30): error TS2302: Static members cannot reference class type parameters. +tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts(11,29): error TS2302: Static members cannot reference class type parameters. +tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts(13,18): error TS2302: Static members cannot reference class type parameters. +tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts(13,24): error TS2302: Static members cannot reference class type parameters. + + ==== tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts (7 errors) ==== // Should be error to use 'T' in all declarations within Foo. class Foo { static a = (n: T) => { }; ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static b: T; ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static c: T[] = []; ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static d = false || ((x: T) => x || undefined)(null) ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static e = function (x: T) { return null; } ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static f(xs: T[]): T[] { ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. return xs.reverse(); } } diff --git a/tests/baselines/reference/genericClassesRedeclaration.errors.txt b/tests/baselines/reference/genericClassesRedeclaration.errors.txt index 63263f3d6a2..8cf048c3061 100644 --- a/tests/baselines/reference/genericClassesRedeclaration.errors.txt +++ b/tests/baselines/reference/genericClassesRedeclaration.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/genericClassesRedeclaration.ts(42,9): error TS2374: Duplicate string index signature. +tests/cases/compiler/genericClassesRedeclaration.ts(55,11): error TS2300: Duplicate identifier 'StringHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(68,11): error TS2300: Duplicate identifier 'IdentiferNameHashTable'. + + ==== tests/cases/compiler/genericClassesRedeclaration.ts (3 errors) ==== declare module TypeScript { interface IIndexable { @@ -42,7 +47,7 @@ interface IIndexable { [s: string]: T; ~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } function createIntrinsicsObject(): IIndexable; interface IHashTable { @@ -57,7 +62,7 @@ } class StringHashTable implements IHashTable { ~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'StringHashTable'. +!!! error TS2300: Duplicate identifier 'StringHashTable'. private itemCount; private table; public getAllKeys(): string[]; @@ -72,7 +77,7 @@ } class IdentiferNameHashTable extends StringHashTable { ~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'IdentiferNameHashTable'. +!!! error TS2300: Duplicate identifier 'IdentiferNameHashTable'. public getAllKeys(): string[]; public add(key: string, data: T): boolean; public addOrUpdate(key: string, data: T): boolean; diff --git a/tests/baselines/reference/genericCloduleInModule2.errors.txt b/tests/baselines/reference/genericCloduleInModule2.errors.txt index 38202cd40e7..6b8ec9012f0 100644 --- a/tests/baselines/reference/genericCloduleInModule2.errors.txt +++ b/tests/baselines/reference/genericCloduleInModule2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericCloduleInModule2.ts(14,8): error TS2314: Generic type 'B' requires 1 type argument(s). + + ==== tests/cases/compiler/genericCloduleInModule2.ts (1 errors) ==== module A { export class B { @@ -14,5 +17,5 @@ var b: A.B; ~~~ -!!! Generic type 'B' requires 1 type argument(s). +!!! error TS2314: Generic type 'B' requires 1 type argument(s). b.foo(); \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes.errors.txt b/tests/baselines/reference/genericCloneReturnTypes.errors.txt index f2ba42e0168..37de816704c 100644 --- a/tests/baselines/reference/genericCloneReturnTypes.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericCloneReturnTypes.ts(25,1): error TS2322: Type 'Bar' is not assignable to type 'Bar': + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/genericCloneReturnTypes.ts (1 errors) ==== class Bar { @@ -25,5 +29,5 @@ b = b2; b = b3; ~ -!!! Type 'Bar' is not assignable to type 'Bar': -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'Bar' is not assignable to type 'Bar': +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt index 06966c7eb23..0d8131871fe 100644 --- a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2322: Type 'MyList' is not assignable to type 'MyList': + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/genericCloneReturnTypes2.ts (1 errors) ==== class MyList { public size: number; @@ -15,5 +19,5 @@ var c: MyList = a.clone(); // bug was there was an error on this line var d: MyList = a.clone(); // error ~ -!!! Type 'MyList' is not assignable to type 'MyList': -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'MyList' is not assignable to type 'MyList': +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCombinators2.errors.txt b/tests/baselines/reference/genericCombinators2.errors.txt index aad1732547a..c09ef79b29b 100644 --- a/tests/baselines/reference/genericCombinators2.errors.txt +++ b/tests/baselines/reference/genericCombinators2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericCombinators2.ts(15,43): error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. +tests/cases/compiler/genericCombinators2.ts(16,43): error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. + + ==== tests/cases/compiler/genericCombinators2.ts (2 errors) ==== interface Collection { length: number; @@ -15,7 +19,7 @@ var rf1 = (x: number, y: string) => { return x.toFixed() }; var r5a = _.map(c2, (x, y) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. +!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. var r5b = _.map(c2, rf1); ~~~ -!!! Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. \ No newline at end of file +!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraint1.errors.txt b/tests/baselines/reference/genericConstraint1.errors.txt index fb61d930f8a..1f3f611a866 100644 --- a/tests/baselines/reference/genericConstraint1.errors.txt +++ b/tests/baselines/reference/genericConstraint1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericConstraint1.ts(8,8): error TS2344: Type 'string' does not satisfy the constraint 'number'. + + ==== tests/cases/compiler/genericConstraint1.ts (1 errors) ==== class C { public bar2(x: T, y: U): T { @@ -8,4 +11,4 @@ var x = new C(); x.bar2(2, ""); ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. \ No newline at end of file +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraint2.errors.txt b/tests/baselines/reference/genericConstraint2.errors.txt index cce6068827d..eda7a260679 100644 --- a/tests/baselines/reference/genericConstraint2.errors.txt +++ b/tests/baselines/reference/genericConstraint2.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/genericConstraint2.ts(5,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/genericConstraint2.ts(11,7): error TS2421: Class 'ComparableString' incorrectly implements interface 'Comparable': + Property 'comparer' is missing in type 'ComparableString'. +tests/cases/compiler/genericConstraint2.ts(21,17): error TS2343: Type 'ComparableString' does not satisfy the constraint 'Comparable': + Property 'comparer' is missing in type 'ComparableString'. + + ==== tests/cases/compiler/genericConstraint2.ts (3 errors) ==== interface Comparable { comparer(other: T): number; @@ -5,7 +12,7 @@ function compare>(x: T, y: T): number { ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. if (x == null) return y == null ? 0 : -1; if (y == null) return 1; return x.comparer(y); @@ -13,8 +20,8 @@ class ComparableString implements Comparable{ ~~~~~~~~~~~~~~~~ -!!! Class 'ComparableString' incorrectly implements interface 'Comparable': -!!! Property 'comparer' is missing in type 'ComparableString'. +!!! error TS2421: Class 'ComparableString' incorrectly implements interface 'Comparable': +!!! error TS2421: Property 'comparer' is missing in type 'ComparableString'. constructor(public currentValue: string) { } localeCompare(other) { @@ -26,5 +33,5 @@ var b = new ComparableString("b"); var c = compare(a, b); ~~~~~~~~~~~~~~~~ -!!! Type 'ComparableString' does not satisfy the constraint 'Comparable': -!!! Property 'comparer' is missing in type 'ComparableString'. \ No newline at end of file +!!! error TS2343: Type 'ComparableString' does not satisfy the constraint 'Comparable': +!!! error TS2343: Property 'comparer' is missing in type 'ComparableString'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraint3.errors.txt b/tests/baselines/reference/genericConstraint3.errors.txt index d7d76b7de6f..525b11504fb 100644 --- a/tests/baselines/reference/genericConstraint3.errors.txt +++ b/tests/baselines/reference/genericConstraint3.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/genericConstraint3.ts(2,16): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/genericConstraint3.ts (1 errors) ==== interface C

{ x: P; } interface A> { x: U; } ~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. interface B extends A<{}, { x: {} }> { } // Should not produce an error \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt b/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt index 8b3673de74b..4602e5eb494 100644 --- a/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt +++ b/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/genericConstraintSatisfaction1.ts(6,5): error TS2345: Argument of type '{ s: number; }' is not assignable to parameter of type '{ s: string; }'. + Types of property 's' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/genericConstraintSatisfaction1.ts (1 errors) ==== interface I { f: (x: T) => void @@ -6,7 +11,7 @@ var x: I<{s: string}> x.f({s: 1}) ~~~~~~ -!!! Argument of type '{ s: number; }' is not assignable to parameter of type '{ s: string; }'. -!!! Types of property 's' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2345: Argument of type '{ s: number; }' is not assignable to parameter of type '{ s: string; }'. +!!! error TS2345: Types of property 's' are incompatible: +!!! error TS2345: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstructExpressionWithoutArgs.errors.txt b/tests/baselines/reference/genericConstructExpressionWithoutArgs.errors.txt index e1ff11eee92..e89bf106ff4 100644 --- a/tests/baselines/reference/genericConstructExpressionWithoutArgs.errors.txt +++ b/tests/baselines/reference/genericConstructExpressionWithoutArgs.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericConstructExpressionWithoutArgs.ts(10,1): error TS1109: Expression expected. +tests/cases/compiler/genericConstructExpressionWithoutArgs.ts(9,16): error TS2304: Cannot find name 'number'. + + ==== tests/cases/compiler/genericConstructExpressionWithoutArgs.ts (2 errors) ==== class B { } var b = new B; // no error @@ -9,7 +13,7 @@ var c = new C // C var c2 = new C // error, type params are actually part of the arg list so you need both ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt b/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt index cee2b8583ed..f155140f4dc 100644 --- a/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt +++ b/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/genericConstructInvocationWithNoTypeArg.ts(4,27): error TS2304: Cannot find name 'Foo'. + + ==== tests/cases/compiler/genericConstructInvocationWithNoTypeArg.ts (1 errors) ==== interface Foo { new (x: number): Foo; } var f2: Foo = new Foo(3); ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstructorFunction1.errors.txt b/tests/baselines/reference/genericConstructorFunction1.errors.txt index 14ac7d99b31..6f821e863f9 100644 --- a/tests/baselines/reference/genericConstructorFunction1.errors.txt +++ b/tests/baselines/reference/genericConstructorFunction1.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/genericConstructorFunction1.ts(4,5): error TS2348: Value of type 'new (arg: T) => Date' is not callable. Did you mean to include 'new'? +tests/cases/compiler/genericConstructorFunction1.ts(13,13): error TS2348: Value of type 'I1' is not callable. Did you mean to include 'new'? + + ==== tests/cases/compiler/genericConstructorFunction1.ts (2 errors) ==== function f1(args: T) { var v1: { [index: string]: new (arg: T) => Date }; var v2 = v1['test']; v2(args); ~~~~~~~~ -!!! Value of type 'new (arg: T) => Date' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'new (arg: T) => Date' is not callable. Did you mean to include 'new'? return new v2(args); // used to give error } @@ -15,6 +19,6 @@ var v2 = v1['test']; var y = v2(args); ~~~~~~~~ -!!! Value of type 'I1' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'I1' is not callable. Did you mean to include 'new'? return new v2(args); // used to give error } \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt index 97da05bd69b..e08cc405426 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts(11,1): error TS2322: Type 'B' is not assignable to type 'A': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts (1 errors) ==== class A { x: T; @@ -11,7 +16,7 @@ var y: B; x = y; // error ~ -!!! Type 'B' is not assignable to type 'A': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'B' is not assignable to type 'A': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt index 74cb9d29c11..bcb406447a4 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS2322: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type '{ length: number; foo: number; }': + Property 'foo' is missing in type 'String'. + + ==== tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts (1 errors) ==== class A { x: T; @@ -11,8 +17,8 @@ var y: B; x = y; // error ~ -!!! Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type '{ length: number; foo: number; }': -!!! Property 'foo' is missing in type 'String'. +!!! error TS2322: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type '{ length: number; foo: number; }': +!!! error TS2322: Property 'foo' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt b/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt index 19c27783c17..a1051e0b020 100644 --- a/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt +++ b/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts(10,1): error TS2304: Cannot find name 'console'. + + ==== tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts (1 errors) ==== interface Array {} @@ -10,5 +13,5 @@ console.log(s); ~~~~~~~ -!!! Cannot find name 'console'. +!!! error TS2304: Cannot find name 'console'. \ No newline at end of file diff --git a/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.errors.txt b/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.errors.txt index 0948a26e76b..6884dd7eeb4 100644 --- a/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.errors.txt +++ b/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/genericFunctionTypedArgumentsAreFixed.ts(2,14): error TS2339: Property 'length' does not exist on type 'number'. + + ==== tests/cases/compiler/genericFunctionTypedArgumentsAreFixed.ts (1 errors) ==== declare function map(f: (x: T) => U, xs: T[]): U[]; map((a) => a.length, [1]); ~~~~~~ -!!! Property 'length' does not exist on type 'number'. \ No newline at end of file +!!! error TS2339: Property 'length' does not exist on type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericFunctionsWithOptionalParameters2.errors.txt b/tests/baselines/reference/genericFunctionsWithOptionalParameters2.errors.txt index 8cc016566d9..5b9ed348583 100644 --- a/tests/baselines/reference/genericFunctionsWithOptionalParameters2.errors.txt +++ b/tests/baselines/reference/genericFunctionsWithOptionalParameters2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericFunctionsWithOptionalParameters2.ts(7,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/genericFunctionsWithOptionalParameters2.ts (1 errors) ==== interface Utils { fold(c: Array, folder?: (s: S, t: T) => T, init?: S): T; @@ -7,7 +10,7 @@ utils.fold(); // error ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. utils.fold(null); // no error utils.fold(null, null); // no error utils.fold(null, null, null); // error: Unable to invoke type with no call signatures diff --git a/tests/baselines/reference/genericFunduleInModule.errors.txt b/tests/baselines/reference/genericFunduleInModule.errors.txt index 1bc72726712..ca82f7d2425 100644 --- a/tests/baselines/reference/genericFunduleInModule.errors.txt +++ b/tests/baselines/reference/genericFunduleInModule.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericFunduleInModule.ts(8,8): error TS2305: Module 'A' has no exported member 'B'. + + ==== tests/cases/compiler/genericFunduleInModule.ts (1 errors) ==== module A { export function B(x: T) { return x; } @@ -8,5 +11,5 @@ var b: A.B; ~~~ -!!! Module 'A' has no exported member 'B'. +!!! error TS2305: Module 'A' has no exported member 'B'. A.B(1); \ No newline at end of file diff --git a/tests/baselines/reference/genericFunduleInModule2.errors.txt b/tests/baselines/reference/genericFunduleInModule2.errors.txt index 306dd66d519..b92b314ece7 100644 --- a/tests/baselines/reference/genericFunduleInModule2.errors.txt +++ b/tests/baselines/reference/genericFunduleInModule2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericFunduleInModule2.ts(11,8): error TS2305: Module 'A' has no exported member 'B'. + + ==== tests/cases/compiler/genericFunduleInModule2.ts (1 errors) ==== module A { export function B(x: T) { return x; } @@ -11,5 +14,5 @@ var b: A.B; ~~~ -!!! Module 'A' has no exported member 'B'. +!!! error TS2305: Module 'A' has no exported member 'B'. A.B(1); \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter.errors.txt b/tests/baselines/reference/genericGetter.errors.txt index 84b2a320580..0b39758ad6c 100644 --- a/tests/baselines/reference/genericGetter.errors.txt +++ b/tests/baselines/reference/genericGetter.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/genericGetter.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/genericGetter.ts(9,5): error TS2323: Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/genericGetter.ts (2 errors) ==== class C { data: T; get x(): T { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.data; } } @@ -11,4 +15,4 @@ var c = new C(); var r: string = c.x; ~ -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter2.errors.txt b/tests/baselines/reference/genericGetter2.errors.txt index 5c30fe0da97..586ae56f606 100644 --- a/tests/baselines/reference/genericGetter2.errors.txt +++ b/tests/baselines/reference/genericGetter2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericGetter2.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/genericGetter2.ts(5,14): error TS2314: Generic type 'A' requires 1 type argument(s). + + ==== tests/cases/compiler/genericGetter2.ts (2 errors) ==== class A { } @@ -5,9 +9,9 @@ data: A; get x(): A { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). return this.data; } } \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter3.errors.txt b/tests/baselines/reference/genericGetter3.errors.txt index ff1e7d5a1f9..a96a3cf8f5d 100644 --- a/tests/baselines/reference/genericGetter3.errors.txt +++ b/tests/baselines/reference/genericGetter3.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericGetter3.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/genericGetter3.ts(11,5): error TS2323: Type 'A' is not assignable to type 'string'. + + ==== tests/cases/compiler/genericGetter3.ts (2 errors) ==== class A { } @@ -5,7 +9,7 @@ data: A; get x(): A { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.data; } } @@ -13,4 +17,4 @@ var c = new C(); var r: string = c.x; ~ -!!! Type 'A' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'A' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericInterfacesWithoutTypeArguments.errors.txt b/tests/baselines/reference/genericInterfacesWithoutTypeArguments.errors.txt index 59b4d33a38e..b81230b440d 100644 --- a/tests/baselines/reference/genericInterfacesWithoutTypeArguments.errors.txt +++ b/tests/baselines/reference/genericInterfacesWithoutTypeArguments.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/genericInterfacesWithoutTypeArguments.ts(3,8): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericInterfacesWithoutTypeArguments.ts(4,10): error TS2314: Generic type 'I' requires 1 type argument(s). + + ==== tests/cases/compiler/genericInterfacesWithoutTypeArguments.ts (2 errors) ==== interface I { } class C { } var i: I; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var c: C; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.errors.txt b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.errors.txt index 27623b6ebab..4348c1cf9c4 100644 --- a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.errors.txt +++ b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericLambaArgWithoutTypeArguments.ts(7,11): error TS2314: Generic type 'Foo' requires 1 type argument(s). + + ==== tests/cases/compiler/genericLambaArgWithoutTypeArguments.ts (1 errors) ==== interface Foo { x: T; @@ -7,5 +10,5 @@ } foo((arg: Foo) => { return arg.x; }); ~~~ -!!! Generic type 'Foo' requires 1 type argument(s). +!!! error TS2314: Generic type 'Foo' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericMemberFunction.errors.txt b/tests/baselines/reference/genericMemberFunction.errors.txt index 4e9e6a0b0d2..2199966ea56 100644 --- a/tests/baselines/reference/genericMemberFunction.errors.txt +++ b/tests/baselines/reference/genericMemberFunction.errors.txt @@ -1,38 +1,48 @@ +tests/cases/compiler/genericMemberFunction.ts(2,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/genericMemberFunction.ts(7,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/genericMemberFunction.ts(10,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/genericMemberFunction.ts(15,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/genericMemberFunction.ts(16,5): error TS2304: Cannot find name 'a'. +tests/cases/compiler/genericMemberFunction.ts(17,5): error TS2304: Cannot find name 'removedFiles'. +tests/cases/compiler/genericMemberFunction.ts(17,30): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/genericMemberFunction.ts(18,12): error TS2339: Property 'removeFile' does not exist on type 'BuildResult'. + + ==== tests/cases/compiler/genericMemberFunction.ts (8 errors) ==== export class BuildError{ public parent(): FileWithErrors { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return undefined; } } export class FileWithErrors{ public errors(): BuildError[] { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return undefined; } public parent(): BuildResult { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return undefined; } } export class BuildResult{ public merge(other: BuildResult): void { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. a.b.c.d.e.f.g = 0; ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. removedFiles.forEach((each: FileWithErrors) => { ~~~~~~~~~~~~ -!!! Cannot find name 'removedFiles'. +!!! error TS2304: Cannot find name 'removedFiles'. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. this.removeFile(each); ~~~~~~~~~~ -!!! Property 'removeFile' does not exist on type 'BuildResult'. +!!! error TS2339: Property 'removeFile' does not exist on type 'BuildResult'. }); } } diff --git a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.errors.txt b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.errors.txt index 5368c5b832a..43a73e76a3e 100644 --- a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.errors.txt +++ b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.errors.txt @@ -1,13 +1,18 @@ +tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts(1,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts(3,19): error TS2304: Cannot find name 'T'. +tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts(4,14): error TS2304: Cannot find name 'T'. + + ==== tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts (3 errors) ==== function foo(y: T, z: U) { return y; } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. module foo { export var x: T; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. var y = 1; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter2.errors.txt b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter2.errors.txt index d6d1f1ae44d..7ab8ac4c0f1 100644 --- a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter2.errors.txt +++ b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter2.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts(3,19): error TS2304: Cannot find name 'T'. +tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts(4,14): error TS2304: Cannot find name 'T'. + + ==== tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts (2 errors) ==== class foo { constructor(x: T) { } } module foo { export var x: T; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. var y = 1; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericNewInterface.errors.txt b/tests/baselines/reference/genericNewInterface.errors.txt index a8574f19eb5..f489b72c1b6 100644 --- a/tests/baselines/reference/genericNewInterface.errors.txt +++ b/tests/baselines/reference/genericNewInterface.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/genericNewInterface.ts(2,21): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/genericNewInterface.ts(10,21): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/genericNewInterface.ts (2 errors) ==== function createInstance(ctor: new (s: string) => T): T { return new ctor(42); //should be an error ~~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. } interface INewable { @@ -12,5 +16,5 @@ function createInstance2(ctor: INewable): T { return new ctor(1024); //should be an error ~~~~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericObjectCreationWithoutTypeArgs.errors.txt b/tests/baselines/reference/genericObjectCreationWithoutTypeArgs.errors.txt index 2d6230b4563..3224d577fd2 100644 --- a/tests/baselines/reference/genericObjectCreationWithoutTypeArgs.errors.txt +++ b/tests/baselines/reference/genericObjectCreationWithoutTypeArgs.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericObjectCreationWithoutTypeArgs.ts(6,26): error TS1109: Expression expected. +tests/cases/compiler/genericObjectCreationWithoutTypeArgs.ts(6,19): error TS2304: Cannot find name 'number'. + + ==== tests/cases/compiler/genericObjectCreationWithoutTypeArgs.ts (2 errors) ==== class SS{ @@ -6,9 +10,9 @@ var x1 = new SS(); // OK var x2 = new SS < number>; // Correctly give error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. var x3 = new SS(); // OK var x4 = new SS; // Should be allowed, but currently give error ('supplied parameters do not match any signature of the call target') \ No newline at end of file diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.errors.txt b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.errors.txt index bce0417d81b..a76eb9d233d 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.errors.txt +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/genericRecursiveImplicitConstructorErrors1.ts(9,49): error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). + + ==== tests/cases/compiler/genericRecursiveImplicitConstructorErrors1.ts (1 errors) ==== export declare module TypeScript { class PullSymbol { } @@ -9,7 +12,7 @@ } class PullTypeParameterSymbol extends PullTypeSymbol { ~~~~~~~~~~~~~~ -!!! Generic type 'PullTypeSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). } } diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.errors.txt b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.errors.txt index ee9aadfdf93..760d1561113 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.errors.txt +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.errors.txt @@ -1,11 +1,21 @@ +tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts(3,66): error TS2314: Generic type 'MemberName' requires 3 type argument(s). +tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts(3,66): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts(10,22): error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). +tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts(12,48): error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). +tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts(13,31): error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). +tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts(14,46): error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). +tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts(18,53): error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). +tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts(19,22): error TS2339: Property 'isArray' does not exist on type 'PullTypeSymbol'. + + ==== tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts (8 errors) ==== module TypeScript { export class MemberName { static create(arg1: any, arg2?: any, arg3?: any): MemberName { ~~~~~~~~~~ -!!! Generic type 'MemberName' requires 3 type argument(s). +!!! error TS2314: Generic type 'MemberName' requires 3 type argument(s). ~~~~~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. } } } @@ -14,26 +24,26 @@ export class PullSymbol { public type: PullTypeSymbol = null; ~~~~~~~~~~~~~~ -!!! Generic type 'PullTypeSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). } export class PullTypeSymbol extends PullSymbol { ~~~~~~~~~~ -!!! Generic type 'PullSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). private _elementType: PullTypeSymbol = null; ~~~~~~~~~~~~~~ -!!! Generic type 'PullTypeSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). public toString(scopeSymbol?: PullSymbol, useConstraintInName?: boolean) { ~~~~~~~~~~ -!!! Generic type 'PullSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). var s = this.getScopedNameEx(scopeSymbol, useConstraintInName).toString(); return s; } public getScopedNameEx(scopeSymbol?: PullSymbol, useConstraintInName?: boolean, getPrettyTypeName?: boolean, getTypeParamMarkerInfo?: boolean) { ~~~~~~~~~~ -!!! Generic type 'PullSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). if (this.isArray()) { ~~~~~~~ -!!! Property 'isArray' does not exist on type 'PullTypeSymbol'. +!!! error TS2339: Property 'isArray' does not exist on type 'PullTypeSymbol'. var elementMemberName = this._elementType ? (this._elementType.isArray() || this._elementType.isNamedTypeSymbol() ? this._elementType.getScopedNameEx(scopeSymbol, false, getPrettyTypeName, getTypeParamMarkerInfo) : diff --git a/tests/baselines/reference/genericReduce.errors.txt b/tests/baselines/reference/genericReduce.errors.txt index 4008fddb919..26e106dba1c 100644 --- a/tests/baselines/reference/genericReduce.errors.txt +++ b/tests/baselines/reference/genericReduce.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/genericReduce.ts(6,4): error TS2339: Property 'x' does not exist on type 'number'. +tests/cases/compiler/genericReduce.ts(8,4): error TS2339: Property 'x' does not exist on type 'number'. +tests/cases/compiler/genericReduce.ts(12,4): error TS2339: Property 'toExponential' does not exist on type 'string'. + + ==== tests/cases/compiler/genericReduce.ts (3 errors) ==== var a = ["An", "array", "of", "strings"]; var b = a.map(s => s.length); @@ -6,15 +11,15 @@ n1.x = "fail"; // should error, as 'n1' should be type 'number', not 'any'. ~ -!!! Property 'x' does not exist on type 'number'. +!!! error TS2339: Property 'x' does not exist on type 'number'. n1.toExponential(2); // should not error if 'n1' is correctly number. n2.x = "fail"; // should error, as 'n2' should be type 'number', not 'any'. ~ -!!! Property 'x' does not exist on type 'number'. +!!! error TS2339: Property 'x' does not exist on type 'number'. n2.toExponential(2); // should not error if 'n2' is correctly number. var n3 = b.reduce( (x, y) => x + y, ""); // Initial value is of type string n3.toExponential(2); // should error if 'n3' is correctly type 'string' ~~~~~~~~~~~~~ -!!! Property 'toExponential' does not exist on type 'string'. +!!! error TS2339: Property 'toExponential' does not exist on type 'string'. n3.charAt(0); // should not error if 'n3' is correctly type 'string' \ No newline at end of file diff --git a/tests/baselines/reference/genericRestArgs.errors.txt b/tests/baselines/reference/genericRestArgs.errors.txt index a23bec39f0e..db36a9a0162 100644 --- a/tests/baselines/reference/genericRestArgs.errors.txt +++ b/tests/baselines/reference/genericRestArgs.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericRestArgs.ts(5,34): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'. + + ==== tests/cases/compiler/genericRestArgs.ts (2 errors) ==== function makeArrayG(...items: T[]): T[] { return items; } var a1Ga = makeArrayG(1, ""); // no error @@ -5,7 +9,7 @@ var a1Gc = makeArrayG(1, ""); var a1Gd = makeArrayG(1, ""); // error ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. function makeArrayGOpt(item1?: T, item2?: T, item3?: T) { return [item1, item2, item3]; @@ -14,4 +18,4 @@ var a2Gb = makeArrayG(1, ""); var a2Gc = makeArrayG(1, ""); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'any[]'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt b/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt index 939cf38cb03..8215d687443 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericReturnTypeFromGetter1.ts(6,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/genericReturnTypeFromGetter1.ts(5,18): error TS2314: Generic type 'A' requires 1 type argument(s). + + ==== tests/cases/compiler/genericReturnTypeFromGetter1.ts (2 errors) ==== export interface A { new (dbSet: DbSet): T; @@ -5,9 +9,9 @@ export class DbSet { _entityType: A; ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). get entityType() { return this._entityType; } // used to ICE without return type annotation ~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/genericSpecializations2.errors.txt b/tests/baselines/reference/genericSpecializations2.errors.txt index 038c65e0e47..49729ca1d8c 100644 --- a/tests/baselines/reference/genericSpecializations2.errors.txt +++ b/tests/baselines/reference/genericSpecializations2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/genericSpecializations2.ts(8,9): error TS2368: Type parameter name cannot be 'string' +tests/cases/compiler/genericSpecializations2.ts(12,9): error TS2368: Type parameter name cannot be 'string' + + ==== tests/cases/compiler/genericSpecializations2.ts (2 errors) ==== class IFoo { foo(x: T): T { // no error on implementors because IFoo's T is different from foo's T @@ -8,13 +12,13 @@ class IntFooBad implements IFoo { foo(x: string): string { return null; } ~~~~~~ -!!! Type parameter name cannot be 'string' +!!! error TS2368: Type parameter name cannot be 'string' } class StringFoo2 implements IFoo { foo(x: string): string { return null; } ~~~~~~ -!!! Type parameter name cannot be 'string' +!!! error TS2368: Type parameter name cannot be 'string' } class StringFoo3 implements IFoo { diff --git a/tests/baselines/reference/genericSpecializations3.errors.txt b/tests/baselines/reference/genericSpecializations3.errors.txt index b4bf9f64bfb..0011be255f1 100644 --- a/tests/baselines/reference/genericSpecializations3.errors.txt +++ b/tests/baselines/reference/genericSpecializations3.errors.txt @@ -1,3 +1,20 @@ +tests/cases/compiler/genericSpecializations3.ts(8,7): error TS2421: Class 'IntFooBad' incorrectly implements interface 'IFoo': + Types of property 'foo' are incompatible: + Type '(x: string) => string' is not assignable to type '(x: number) => number': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericSpecializations3.ts(28,1): error TS2322: Type 'StringFoo2' is not assignable to type 'IntFoo': + Types of property 'foo' are incompatible: + Type '(x: string) => string' is not assignable to type '(x: number) => number': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFoo' is not assignable to type 'StringFoo2': + Types of property 'foo' are incompatible: + Type '(x: number) => number' is not assignable to type '(x: string) => string': + Types of parameters 'x' and 'x' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/genericSpecializations3.ts (3 errors) ==== interface IFoo { foo(x: T): T; @@ -8,11 +25,11 @@ class IntFooBad implements IFoo { // error ~~~~~~~~~ -!!! Class 'IntFooBad' incorrectly implements interface 'IFoo': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string) => string' is not assignable to type '(x: number) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2421: Class 'IntFooBad' incorrectly implements interface 'IFoo': +!!! error TS2421: Types of property 'foo' are incompatible: +!!! error TS2421: Type '(x: string) => string' is not assignable to type '(x: number) => number': +!!! error TS2421: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2421: Type 'string' is not assignable to type 'number'. foo(x: string): string { return null; } } @@ -34,18 +51,18 @@ intFoo = stringFoo2; // error ~~~~~~ -!!! Type 'StringFoo2' is not assignable to type 'IntFoo': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string) => string' is not assignable to type '(x: number) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'StringFoo2' is not assignable to type 'IntFoo': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => number': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. stringFoo2 = intFoo; // error ~~~~~~~~~~ -!!! Type 'IntFoo' is not assignable to type 'StringFoo2': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: number) => number' is not assignable to type '(x: string) => string': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'IntFoo' is not assignable to type 'StringFoo2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: number) => number' is not assignable to type '(x: string) => string': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. class StringFoo3 implements IFoo { // error diff --git a/tests/baselines/reference/genericTypeAssertions1.errors.txt b/tests/baselines/reference/genericTypeAssertions1.errors.txt index 7ab9e056611..9e0492a8474 100644 --- a/tests/baselines/reference/genericTypeAssertions1.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions1.errors.txt @@ -1,15 +1,24 @@ +tests/cases/compiler/genericTypeAssertions1.ts(3,5): error TS2322: Type 'A' is not assignable to type 'A': + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/genericTypeAssertions1.ts(4,5): error TS2322: Type 'A>' is not assignable to type 'A': + Type 'A' is not assignable to type 'number'. +tests/cases/compiler/genericTypeAssertions1.ts(4,21): error TS2353: Neither type 'A' nor type 'A>' is assignable to the other: + Type 'number' is not assignable to type 'A': + Property 'foo' is missing in type 'Number'. + + ==== tests/cases/compiler/genericTypeAssertions1.ts (3 errors) ==== class A { foo(x: T) { }} var foo = new A(); var r: A = >new A(); // error ~ -!!! Type 'A' is not assignable to type 'A': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Type 'number' is not assignable to type 'string'. var r2: A = >>foo; // error ~~ -!!! Type 'A>' is not assignable to type 'A': -!!! Type 'A' is not assignable to type 'number'. +!!! error TS2322: Type 'A>' is not assignable to type 'A': +!!! error TS2322: Type 'A' is not assignable to type 'number'. ~~~~~~~~~~~~~~~~~ -!!! Neither type 'A' nor type 'A>' is assignable to the other: -!!! Type 'number' is not assignable to type 'A': -!!! Property 'foo' is missing in type 'Number'. \ No newline at end of file +!!! error TS2353: Neither type 'A' nor type 'A>' is assignable to the other: +!!! error TS2353: Type 'number' is not assignable to type 'A': +!!! error TS2353: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions2.errors.txt b/tests/baselines/reference/genericTypeAssertions2.errors.txt index 886031edaaf..887e66a532f 100644 --- a/tests/baselines/reference/genericTypeAssertions2.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions2.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/genericTypeAssertions2.ts(10,5): error TS2322: Type 'B' is not assignable to type 'A': + Types of property 'foo' are incompatible: + Type '(x: string) => void' is not assignable to type '(x: number) => void': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericTypeAssertions2.ts(11,5): error TS2322: Type 'A' is not assignable to type 'B': + Property 'bar' is missing in type 'A'. +tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2353: Neither type 'undefined[]' nor type 'A' is assignable to the other: + Property 'foo' is missing in type 'undefined[]'. + + ==== tests/cases/compiler/genericTypeAssertions2.ts (3 errors) ==== class A { foo(x: T) { } } class B extends A { @@ -10,17 +21,17 @@ var r: A = >new B(); var r2: A = >new B(); // error ~~ -!!! Type 'B' is not assignable to type 'A': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'B' is not assignable to type 'A': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r3: B = >new B(); // error ~~ -!!! Type 'A' is not assignable to type 'B': -!!! Property 'bar' is missing in type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'B': +!!! error TS2322: Property 'bar' is missing in type 'A'. var r4: A = >new A(); var r5: A = >[]; // error ~~~~~~~~~~~~~ -!!! Neither type 'undefined[]' nor type 'A' is assignable to the other: -!!! Property 'foo' is missing in type 'undefined[]'. \ No newline at end of file +!!! error TS2353: Neither type 'undefined[]' nor type 'A' is assignable to the other: +!!! error TS2353: Property 'foo' is missing in type 'undefined[]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions4.errors.txt b/tests/baselines/reference/genericTypeAssertions4.errors.txt index c109b6988e9..2a29eac6220 100644 --- a/tests/baselines/reference/genericTypeAssertions4.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions4.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/genericTypeAssertions4.ts(19,5): error TS2323: Type 'A' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions4.ts(20,5): error TS2323: Type 'B' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions4.ts(21,5): error TS2323: Type 'C' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions4.ts(23,9): error TS2352: Neither type 'B' nor type 'T' is assignable to the other. +tests/cases/compiler/genericTypeAssertions4.ts(24,9): error TS2352: Neither type 'C' nor type 'T' is assignable to the other. + + ==== tests/cases/compiler/genericTypeAssertions4.ts (5 errors) ==== class A { foo() { return ""; } @@ -19,18 +26,18 @@ var y = x; y = a; // error: cannot convert A to T ~ -!!! Type 'A' is not assignable to type 'T'. +!!! error TS2323: Type 'A' is not assignable to type 'T'. y = b; // error: cannot convert B to T ~ -!!! Type 'B' is not assignable to type 'T'. +!!! error TS2323: Type 'B' is not assignable to type 'T'. y = c; // error: cannot convert C to T ~ -!!! Type 'C' is not assignable to type 'T'. +!!! error TS2323: Type 'C' is not assignable to type 'T'. y = a; y = b; // error: cannot convert B to T ~~~~ -!!! Neither type 'B' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'B' nor type 'T' is assignable to the other. y = c; // error: cannot convert C to T ~~~~ -!!! Neither type 'C' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'C' nor type 'T' is assignable to the other. } \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions5.errors.txt b/tests/baselines/reference/genericTypeAssertions5.errors.txt index 7fe23527273..3c53a791b9b 100644 --- a/tests/baselines/reference/genericTypeAssertions5.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions5.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/genericTypeAssertions5.ts(19,5): error TS2323: Type 'A' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions5.ts(20,5): error TS2323: Type 'B' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions5.ts(21,5): error TS2323: Type 'C' is not assignable to type 'T'. +tests/cases/compiler/genericTypeAssertions5.ts(23,9): error TS2352: Neither type 'B' nor type 'T' is assignable to the other. +tests/cases/compiler/genericTypeAssertions5.ts(24,9): error TS2352: Neither type 'C' nor type 'T' is assignable to the other. + + ==== tests/cases/compiler/genericTypeAssertions5.ts (5 errors) ==== interface A { foo(): string; @@ -19,18 +26,18 @@ var y = x; y = a; // error: cannot convert A to T ~ -!!! Type 'A' is not assignable to type 'T'. +!!! error TS2323: Type 'A' is not assignable to type 'T'. y = b; // error: cannot convert B to T ~ -!!! Type 'B' is not assignable to type 'T'. +!!! error TS2323: Type 'B' is not assignable to type 'T'. y = c; // error: cannot convert C to T ~ -!!! Type 'C' is not assignable to type 'T'. +!!! error TS2323: Type 'C' is not assignable to type 'T'. y = a; y = b; // error: cannot convert B to T ~~~~ -!!! Neither type 'B' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'B' nor type 'T' is assignable to the other. y = c; // error: cannot convert C to T ~~~~ -!!! Neither type 'C' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'C' nor type 'T' is assignable to the other. } \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions6.errors.txt b/tests/baselines/reference/genericTypeAssertions6.errors.txt index 99d7f6b8509..93677b9ab84 100644 --- a/tests/baselines/reference/genericTypeAssertions6.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions6.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/genericTypeAssertions6.ts(8,13): error TS2352: Neither type 'U' nor type 'T' is assignable to the other. +tests/cases/compiler/genericTypeAssertions6.ts(9,13): error TS2352: Neither type 'T' nor type 'U' is assignable to the other. +tests/cases/compiler/genericTypeAssertions6.ts(19,17): error TS2352: Neither type 'U' nor type 'T' is assignable to the other. + + ==== tests/cases/compiler/genericTypeAssertions6.ts (3 errors) ==== class A { constructor(x) { @@ -8,10 +13,10 @@ f(x: T, y: U) { x = y; ~~~~ -!!! Neither type 'U' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'U' nor type 'T' is assignable to the other. y = x; ~~~~ -!!! Neither type 'T' nor type 'U' is assignable to the other. +!!! error TS2352: Neither type 'T' nor type 'U' is assignable to the other. } } @@ -23,7 +28,7 @@ var d = new Date(); var e = new Date(); ~~~~~~~~~~~~~~~~ -!!! Neither type 'U' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'U' nor type 'T' is assignable to the other. } } diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt index b3fdd2a93af..f646ac4725e 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(12,19): error TS1023: An index signature parameter type must be 'string' or 'number'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(8,16): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(10,21): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(11,22): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(11,26): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(12,22): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(12,26): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(14,23): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(14,27): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(16,25): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(22,26): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(23,28): error TS2314: Generic type 'E' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(25,30): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(26,30): error TS2314: Generic type 'E' requires 1 type argument(s). + + ==== tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts (14 errors) ==== // it is an error to use a generic type without type arguments // all of these are errors @@ -8,33 +24,33 @@ declare var c: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var a: { x: C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var b: { (x: C): C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var d: { [x: C]: C }; ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare function f(x: C): C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare class D extends C {} ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare module M { export class E { foo: T } @@ -42,14 +58,14 @@ declare class D2 extends M.C { } ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. declare class D3 { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). declare function h(x: T); ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare function i(x: T); ~~~ -!!! Generic type 'E' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.errors.txt index e8fee6f002b..a8627f3f18e 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.errors.txt @@ -1,3 +1,29 @@ +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1023: An index signature parameter type must be 'string' or 'number'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(8,8): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(10,13): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(11,14): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(16,19): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(16,30): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(18,23): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(18,27): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(18,38): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(20,17): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). + + ==== tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts (24 errors) ==== // it is an error to use a generic type without type arguments // all of these are errors @@ -8,54 +34,54 @@ var c: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var a: { x: C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var b: { (x: C): C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var d: { [x: C]: C }; ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var e = (x: C) => { var y: C; return y; } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). function f(x: C): C { var y: C; return y; } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var g = function f(x: C): C { var y: C; return y; } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). class D extends C { ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). } interface I extends C {} ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). module M { export class E { foo: T } @@ -63,24 +89,24 @@ class D2 extends M.E { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). class D3 { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). interface I2 extends M.E { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). function h(x: T) { } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). function i(x: T) { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). var j = null; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var k = null; ~~~ -!!! Generic type 'E' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt index 0513aaff05c..1802d0385c4 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt @@ -1,3 +1,29 @@ +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1023: An index signature parameter type must be 'string' or 'number'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(8,8): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(10,13): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(11,14): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(16,19): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(16,30): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(18,23): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(18,27): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(18,38): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(23,21): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(31,22): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). + + ==== tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts (24 errors) ==== // it is an error to use a generic type without type arguments // all of these are errors @@ -8,54 +34,54 @@ var c: I; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var a: { x: I }; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var b: { (x: I): I }; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var d: { [x: I]: I }; ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var e = (x: I) => { var y: I; return y; } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). function f(x: I): I { var y: I; return y; } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var g = function f(x: I): I { var y: I; return y; } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). class D extends I { ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). } interface U extends I {} ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). module M { export interface E { foo: T } @@ -63,24 +89,24 @@ class D2 extends M.C { } ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. interface D3 { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). interface I2 extends M.C { } ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. function h(x: T) { } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). function i(x: T) { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). var j = null; ~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. var k = null; ~~~ -!!! Generic type 'E' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt index 7b0e4ba6fbe..41774da0d00 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt @@ -1,3 +1,19 @@ +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,19): error TS1023: An index signature parameter type must be 'string' or 'number'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(8,16): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(10,21): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(11,22): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(11,26): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,22): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,26): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,23): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,27): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(16,25): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(22,26): error TS2305: Module 'M' has no exported member 'C'. +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(23,28): error TS2314: Generic type 'E' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(25,30): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(26,30): error TS2314: Generic type 'E' requires 1 type argument(s). + + ==== tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts (14 errors) ==== // it is an error to use a generic type without type arguments // all of these are errors @@ -8,33 +24,33 @@ declare var c: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var a: { x: C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var b: { (x: C): C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var d: { [x: C]: C }; ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare function f(x: C): C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare class D extends C {} ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare module M { export class E { foo: T } @@ -42,14 +58,14 @@ declare class D2 extends M.C { } ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. declare class D3 { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). declare function h(x: T); ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare function i(x: T); ~~~ -!!! Generic type 'E' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.errors.txt b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.errors.txt index 6f464ab0eab..224e5e038da 100644 --- a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.errors.txt +++ b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts(7,9): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts(8,9): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts(9,11): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts(10,11): error TS2314: Generic type 'C' requires 1 type argument(s). + + ==== tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts (4 errors) ==== class C { foo(): T { return null } @@ -7,14 +13,14 @@ } var c1: C; // error ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var i1: I; // error ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var c2: C; // should be an error ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var i2: I; // should be an error ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeUsedWithoutTypeArguments1.errors.txt b/tests/baselines/reference/genericTypeUsedWithoutTypeArguments1.errors.txt index 8f923d6bdb7..836f250f5fc 100644 --- a/tests/baselines/reference/genericTypeUsedWithoutTypeArguments1.errors.txt +++ b/tests/baselines/reference/genericTypeUsedWithoutTypeArguments1.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/genericTypeUsedWithoutTypeArguments1.ts(2,25): error TS2314: Generic type 'Foo' requires 1 type argument(s). + + ==== tests/cases/compiler/genericTypeUsedWithoutTypeArguments1.ts (1 errors) ==== interface Foo { } class Bar implements Foo { } ~~~ -!!! Generic type 'Foo' requires 1 type argument(s). +!!! error TS2314: Generic type 'Foo' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeUsedWithoutTypeArguments3.errors.txt b/tests/baselines/reference/genericTypeUsedWithoutTypeArguments3.errors.txt index b6f9510b525..c76133014f0 100644 --- a/tests/baselines/reference/genericTypeUsedWithoutTypeArguments3.errors.txt +++ b/tests/baselines/reference/genericTypeUsedWithoutTypeArguments3.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/genericTypeUsedWithoutTypeArguments3.ts(2,26): error TS2314: Generic type 'Foo' requires 1 type argument(s). + + ==== tests/cases/compiler/genericTypeUsedWithoutTypeArguments3.ts (1 errors) ==== interface Foo { } interface Bar extends Foo { } ~~~ -!!! Generic type 'Foo' requires 1 type argument(s). +!!! error TS2314: Generic type 'Foo' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt index 2b755e16db2..a1efb4a4e87 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt @@ -1,26 +1,42 @@ +tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(4,7): error TS2421: Class 'X' incorrectly implements interface 'I': + Types of property 'f' are incompatible: + Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void': + Types of parameters 'a' and 'a' are incompatible: + Type 'T' is not assignable to type '{ a: number; }': + Types of property 'a' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I': + Types of property 'f' are incompatible: + Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void': + Types of parameters 'a' and 'a' are incompatible: + Type '{ a: string; }' is not assignable to type '{ a: number; }': + Types of property 'a' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts (2 errors) ==== interface I { f: (a: { a: number }) => void } class X implements I { ~ -!!! Class 'X' incorrectly implements interface 'I': -!!! Types of property 'f' are incompatible: -!!! Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void': -!!! Types of parameters 'a' and 'a' are incompatible: -!!! Type 'T' is not assignable to type '{ a: number; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2421: Class 'X' incorrectly implements interface 'I': +!!! error TS2421: Types of property 'f' are incompatible: +!!! error TS2421: Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void': +!!! error TS2421: Types of parameters 'a' and 'a' are incompatible: +!!! error TS2421: Type 'T' is not assignable to type '{ a: number; }': +!!! error TS2421: Types of property 'a' are incompatible: +!!! error TS2421: Type 'string' is not assignable to type 'number'. f(a: T): void { } } var x = new X<{ a: string }>(); var i: I = x; // Should not be allowed -- type of 'f' is incompatible with 'I' ~ -!!! Type 'X<{ a: string; }>' is not assignable to type 'I': -!!! Types of property 'f' are incompatible: -!!! Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void': -!!! Types of parameters 'a' and 'a' are incompatible: -!!! Type '{ a: string; }' is not assignable to type '{ a: number; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void': +!!! error TS2322: Types of parameters 'a' and 'a' are incompatible: +!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ a: number; }': +!!! error TS2322: Types of property 'a' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt index 98b077e1a77..98db4282244 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/genericWithOpenTypeParameters1.ts(7,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. +tests/cases/compiler/genericWithOpenTypeParameters1.ts(8,35): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/genericWithOpenTypeParameters1.ts(9,35): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/genericWithOpenTypeParameters1.ts (3 errors) ==== class B { foo(x: T): T { return null; } @@ -7,12 +12,12 @@ x.foo(1); // no error var f = (x: B) => { return x.foo(1); } // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. var f2 = (x: B) => { return x.foo(1); } // error ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f3 = (x: B) => { return x.foo(1); } // error ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f4 = (x: B) => { return x.foo(1); } // no error \ No newline at end of file diff --git a/tests/baselines/reference/generics1.errors.txt b/tests/baselines/reference/generics1.errors.txt index 030a820e6c9..4d378d0b7d6 100644 --- a/tests/baselines/reference/generics1.errors.txt +++ b/tests/baselines/reference/generics1.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/generics1.ts(10,9): error TS2343: Type 'A' does not satisfy the constraint 'B': + Property 'b' is missing in type 'A'. +tests/cases/compiler/generics1.ts(13,9): error TS2314: Generic type 'G' requires 2 type argument(s). +tests/cases/compiler/generics1.ts(14,9): error TS2314: Generic type 'G' requires 2 type argument(s). + + ==== tests/cases/compiler/generics1.ts (3 errors) ==== interface A { a: string; } interface B extends A { b: string; } @@ -10,14 +16,14 @@ var v2: G<{ a: string }, C>; // Ok, equivalent to G var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! Type 'A' does not satisfy the constraint 'B': -!!! Property 'b' is missing in type 'A'. +!!! error TS2343: Type 'A' does not satisfy the constraint 'B': +!!! error TS2343: Property 'b' is missing in type 'A'. var v4: G, C>; // Ok var v5: G; // Error, any does not satisfy constraint B var v6: G; // Error, wrong number of arguments ~~~~~~ -!!! Generic type 'G' requires 2 type argument(s). +!!! error TS2314: Generic type 'G' requires 2 type argument(s). var v7: G; // Error, no type arguments ~ -!!! Generic type 'G' requires 2 type argument(s). +!!! error TS2314: Generic type 'G' requires 2 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/generics2.errors.txt b/tests/baselines/reference/generics2.errors.txt index 0d4742bc0e8..dfe58f07f23 100644 --- a/tests/baselines/reference/generics2.errors.txt +++ b/tests/baselines/reference/generics2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/generics2.ts(17,9): error TS2343: Type 'A' does not satisfy the constraint 'B': + Property 'b' is missing in type 'A'. +tests/cases/compiler/generics2.ts(20,9): error TS2314: Generic type 'G' requires 2 type argument(s). +tests/cases/compiler/generics2.ts(21,9): error TS2314: Generic type 'G' requires 2 type argument(s). + + ==== tests/cases/compiler/generics2.ts (3 errors) ==== interface A { a: string; } interface B extends A { b: string; } @@ -17,14 +23,14 @@ var v2: G<{ a: string }, C>; // Ok, equivalent to G var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! Type 'A' does not satisfy the constraint 'B': -!!! Property 'b' is missing in type 'A'. +!!! error TS2343: Type 'A' does not satisfy the constraint 'B': +!!! error TS2343: Property 'b' is missing in type 'A'. var v4: G, C>; // Ok var v5: G; // Error, any does not satisfy constraint B var v6: G; // Error, wrong number of arguments ~~~~~~ -!!! Generic type 'G' requires 2 type argument(s). +!!! error TS2314: Generic type 'G' requires 2 type argument(s). var v7: G; // Error, no type arguments ~ -!!! Generic type 'G' requires 2 type argument(s). +!!! error TS2314: Generic type 'G' requires 2 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/generics4.errors.txt b/tests/baselines/reference/generics4.errors.txt index 9e2f1a5ccda..dcf210a53cf 100644 --- a/tests/baselines/reference/generics4.errors.txt +++ b/tests/baselines/reference/generics4.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/generics4.ts(7,1): error TS2322: Type 'C' is not assignable to type 'C': + Type 'Y' is not assignable to type 'X': + Types of property 'f' are incompatible: + Type '() => boolean' is not assignable to type '() => string': + Type 'boolean' is not assignable to type 'string'. + + ==== tests/cases/compiler/generics4.ts (1 errors) ==== class C { private x: T; } interface X { f(): string; } @@ -7,8 +14,8 @@ a = b; // Not ok - return types of "f" are different ~ -!!! Type 'C' is not assignable to type 'C': -!!! Type 'Y' is not assignable to type 'X': -!!! Types of property 'f' are incompatible: -!!! Type '() => boolean' is not assignable to type '() => string': -!!! Type 'boolean' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C': +!!! error TS2322: Type 'Y' is not assignable to type 'X': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '() => boolean' is not assignable to type '() => string': +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/generics5.errors.txt b/tests/baselines/reference/generics5.errors.txt index 74f5d0e6e2c..fa279b92a5d 100644 --- a/tests/baselines/reference/generics5.errors.txt +++ b/tests/baselines/reference/generics5.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/generics5.ts(10,9): error TS2343: Type 'A' does not satisfy the constraint 'B': + Property 'b' is missing in type 'A'. + + ==== tests/cases/compiler/generics5.ts (1 errors) ==== interface A { a: string; } interface B extends A { b: string; } @@ -10,7 +14,7 @@ var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! Type 'A' does not satisfy the constraint 'B': -!!! Property 'b' is missing in type 'A'. +!!! error TS2343: Type 'A' does not satisfy the constraint 'B': +!!! error TS2343: Property 'b' is missing in type 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.errors.txt b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.errors.txt index 052822f1bad..879a1b52d3b 100644 --- a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.errors.txt @@ -1,37 +1,49 @@ +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(1,15): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(2,16): error TS2300: Duplicate identifier 'X'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(3,12): error TS2300: Duplicate identifier 'X'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(4,17): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(5,18): error TS2300: Duplicate identifier 'X'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(8,16): error TS2300: Duplicate identifier 'X'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(9,10): error TS2300: Duplicate identifier 'X'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(10,11): error TS2300: Duplicate identifier 'X'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(14,22): error TS2300: Duplicate identifier 'X'. +tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts(15,23): error TS2300: Duplicate identifier 'X'. + + ==== tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts (10 errors) ==== function f() { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. function f2(a: X, b: X): X { return null; } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. class C { ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. public f() {} ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. public f2(a: X, b: X): X { return null; } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. } interface I { ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. f(); ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. f2(a: X, b: X): X; ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. } var m = { a: function f() {}, ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. b: function f2(a: X, b: X): X { return null; } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericsWithoutTypeParameters1.errors.txt b/tests/baselines/reference/genericsWithoutTypeParameters1.errors.txt index eb0aac2035f..c1382788beb 100644 --- a/tests/baselines/reference/genericsWithoutTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericsWithoutTypeParameters1.errors.txt @@ -1,3 +1,20 @@ +tests/cases/compiler/genericsWithoutTypeParameters1.ts(9,9): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(10,9): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(11,11): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(12,11): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(14,17): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(14,23): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(15,20): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(15,29): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(17,13): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(18,14): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(21,8): error TS2314: Generic type 'C' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(22,8): error TS2314: Generic type 'D' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(26,8): error TS2314: Generic type 'I' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(27,8): error TS2314: Generic type 'J' requires 1 type argument(s). +tests/cases/compiler/genericsWithoutTypeParameters1.ts(31,22): error TS2314: Generic type 'A' requires 1 type argument(s). + + ==== tests/cases/compiler/genericsWithoutTypeParameters1.ts (15 errors) ==== class C { foo(): T { return null } @@ -9,56 +26,56 @@ var c1: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var i1: I; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var c2: C; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var i2: I; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). function foo(x: C, y: I) { } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). function foo2(x: C, y: I) { } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var x: { a: C } = { a: new C() }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var x2: { a: I } = { a: { bar() { return 1 } } }; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). class D { x: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). y: D; ~ -!!! Generic type 'D' requires 1 type argument(s). +!!! error TS2314: Generic type 'D' requires 1 type argument(s). } interface J { x: I; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). y: J; ~ -!!! Generic type 'J' requires 1 type argument(s). +!!! error TS2314: Generic type 'J' requires 1 type argument(s). } class A { } function f(x: T): A { ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). return null; } \ No newline at end of file diff --git a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt index 2a3e67203c9..ea6068225d9 100644 --- a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt +++ b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt @@ -1,10 +1,16 @@ +tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(21,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(1,41): error TS2304: Cannot find name '_'. +tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(2,34): error TS2304: Cannot find name '_'. +tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(15,15): error TS2300: Duplicate identifier '_'. + + ==== tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts (4 errors) ==== declare function _(value: Array): _; ~~~~ -!!! Cannot find name '_'. +!!! error TS2304: Cannot find name '_'. declare function _(value: T): _; ~~~~ -!!! Cannot find name '_'. +!!! error TS2304: Cannot find name '_'. declare module _ { export function each( @@ -19,7 +25,7 @@ declare class _ { ~ -!!! Duplicate identifier '_'. +!!! error TS2300: Duplicate identifier '_'. each(iterator: _.ListIterator, context?: any): void; } @@ -27,7 +33,7 @@ export class MyClass { public get myGetter() { ~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var obj:any = {}; return obj; diff --git a/tests/baselines/reference/getAndSetAsMemberNames.errors.txt b/tests/baselines/reference/getAndSetAsMemberNames.errors.txt index ca92470e011..a83c4ba118c 100644 --- a/tests/baselines/reference/getAndSetAsMemberNames.errors.txt +++ b/tests/baselines/reference/getAndSetAsMemberNames.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/getAndSetAsMemberNames.ts(19,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/getAndSetAsMemberNames.ts (1 errors) ==== class C1 { set: boolean; @@ -19,6 +22,6 @@ get (): boolean { return true; } set t(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt index dbb4e935f2b..5fe2e7ae321 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt @@ -1,17 +1,23 @@ +tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getAndSetNotIdenticalType.ts(2,5): error TS2380: 'get' and 'set' accessor must have the same type. +tests/cases/compiler/getAndSetNotIdenticalType.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type. + + ==== tests/cases/compiler/getAndSetNotIdenticalType.ts (4 errors) ==== class C { get x(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~ return 1; ~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. set x(v: string) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. } \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt index 4589f529603..b4843deb9c2 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type. +tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,5): error TS2380: 'get' and 'set' accessor must have the same type. +tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2322: Type 'A' is not assignable to type 'A': + Type 'string' is not assignable to type 'T'. + + ==== tests/cases/compiler/getAndSetNotIdenticalType2.ts (5 errors) ==== class A { foo: T; } @@ -5,25 +13,25 @@ data: A; get x(): A { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~ return this.data; ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. set x(v: A) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~ this.data = v; ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ -!!! Type 'A' is not assignable to type 'A': -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Type 'string' is not assignable to type 'T'. } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. } var x = new C(); diff --git a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt index 193f7613202..637c140a1f3 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type. +tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,5): error TS2380: 'get' and 'set' accessor must have the same type. +tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2322: Type 'A' is not assignable to type 'A': + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/getAndSetNotIdenticalType3.ts (5 errors) ==== class A { foo: T; } @@ -5,25 +13,25 @@ data: A; get x(): A { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~ return this.data; ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. set x(v: A) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~ this.data = v; ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ -!!! Type 'A' is not assignable to type 'A': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Type 'string' is not assignable to type 'number'. } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. } var x = new C(); diff --git a/tests/baselines/reference/getsetReturnTypes.errors.txt b/tests/baselines/reference/getsetReturnTypes.errors.txt index 8b9b68e87cc..2a69548c7aa 100644 --- a/tests/baselines/reference/getsetReturnTypes.errors.txt +++ b/tests/baselines/reference/getsetReturnTypes.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/getsetReturnTypes.ts(3,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/getsetReturnTypes.ts (1 errors) ==== function makePoint(x: number) { return { get x() { return x; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } }; var x = makePoint(2).x; diff --git a/tests/baselines/reference/getterMissingReturnError.errors.txt b/tests/baselines/reference/getterMissingReturnError.errors.txt index ae560c5de87..8900cc5e78f 100644 --- a/tests/baselines/reference/getterMissingReturnError.errors.txt +++ b/tests/baselines/reference/getterMissingReturnError.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/getterMissingReturnError.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getterMissingReturnError.ts(2,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + + ==== tests/cases/compiler/getterMissingReturnError.ts (2 errors) ==== class test { public get p2(){ ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } } diff --git a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt index 8b1a7a10a3a..563f30a201c 100644 --- a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt +++ b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/getterThatThrowsShouldNotNeedReturn.ts(2,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/getterThatThrowsShouldNotNeedReturn.ts (1 errors) ==== class Greeter { public get greet(): string { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. throw ''; // should not raise an error } public greeting(): string { diff --git a/tests/baselines/reference/gettersAndSetters.errors.txt b/tests/baselines/reference/gettersAndSetters.errors.txt index c17653545fa..2c287f30497 100644 --- a/tests/baselines/reference/gettersAndSetters.errors.txt +++ b/tests/baselines/reference/gettersAndSetters.errors.txt @@ -1,3 +1,13 @@ +tests/cases/compiler/gettersAndSetters.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSetters.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSetters.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSetters.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSetters.ts(29,30): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSetters.ts(29,53): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSetters.ts(25,13): error TS2339: Property 'Baz' does not exist on type 'C'. +tests/cases/compiler/gettersAndSetters.ts(26,3): error TS2339: Property 'Baz' does not exist on type 'C'. + + ==== tests/cases/compiler/gettersAndSetters.ts (8 errors) ==== // classes class C { @@ -7,17 +17,17 @@ public get Foo() { return this.fooBack;} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Foo(foo:string) {this.fooBack = foo;} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static get Bar() {return C.barBack;} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set Bar(bar:string) {C.barBack = bar;} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get = function() {} // ok public set = function() {} // ok @@ -33,17 +43,17 @@ var baz = c.Baz; ~~~ -!!! Property 'Baz' does not exist on type 'C'. +!!! error TS2339: Property 'Baz' does not exist on type 'C'. c.Baz = "bazv"; ~~~ -!!! Property 'Baz' does not exist on type 'C'. +!!! error TS2339: Property 'Baz' does not exist on type 'C'. // The Foo accessors' return and param types should be contextually typed to the Foo field var o : {Foo:number;} = {get Foo() {return 0;}, set Foo(val:number){val}}; // o ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var ofg = o.Foo; o.Foo = 0; diff --git a/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt b/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt index df23e0da362..ddb8e95e5eb 100644 --- a/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt +++ b/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt @@ -1,14 +1,20 @@ +tests/cases/compiler/gettersAndSettersAccessibility.ts(2,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersAccessibility.ts(3,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersAccessibility.ts(2,14): error TS2379: Getter and setter accessors do not agree in visibility. +tests/cases/compiler/gettersAndSettersAccessibility.ts(3,13): error TS2379: Getter and setter accessors do not agree in visibility. + + ==== tests/cases/compiler/gettersAndSettersAccessibility.ts (4 errors) ==== class C99 { private get Baz():number { return 0; } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Getter and setter accessors do not agree in visibility. +!!! error TS2379: Getter and setter accessors do not agree in visibility. public set Baz(n:number) {} // error - accessors do not agree in visibility ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Getter and setter accessors do not agree in visibility. +!!! error TS2379: Getter and setter accessors do not agree in visibility. } \ No newline at end of file diff --git a/tests/baselines/reference/gettersAndSettersErrors.errors.txt b/tests/baselines/reference/gettersAndSettersErrors.errors.txt index 1cfefea5202..b87dba8809c 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.errors.txt +++ b/tests/baselines/reference/gettersAndSettersErrors.errors.txt @@ -1,34 +1,45 @@ +tests/cases/compiler/gettersAndSettersErrors.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersErrors.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersErrors.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersErrors.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS2379: Getter and setter accessors do not agree in visibility. +tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS2379: Getter and setter accessors do not agree in visibility. + + ==== tests/cases/compiler/gettersAndSettersErrors.ts (9 errors) ==== class C { public get Foo() { return "foo";} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Foo(foo:string) {} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public Foo = 0; // error - duplicate identifier Foo - confirmed ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. public get Goo(v:string):string {return null;} // error - getters must not have a parameter ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Goo(v:string):string {} // error - setters must not specify a return type ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class E { private get Baz():number { return 0; } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Getter and setter accessors do not agree in visibility. +!!! error TS2379: Getter and setter accessors do not agree in visibility. public set Baz(n:number) {} // error - accessors do not agree in visibility ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Getter and setter accessors do not agree in visibility. +!!! error TS2379: Getter and setter accessors do not agree in visibility. } diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt b/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt index 5b869132a70..7412b56e576 100644 --- a/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt +++ b/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt @@ -1,27 +1,37 @@ +tests/cases/compiler/gettersAndSettersTypesAgree.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersTypesAgree.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersTypesAgree.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersTypesAgree.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersTypesAgree.ts(9,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersTypesAgree.ts(9,37): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersTypesAgree.ts(10,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersTypesAgree.ts(10,37): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/gettersAndSettersTypesAgree.ts (8 errors) ==== class C { public get Foo() { return "foo";} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Foo(foo) {} // ok - type inferred from getter return statement ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get Bar() { return "foo";} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Bar(bar:string) {} // ok - type must be declared ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var o1 = {get Foo(){return 0;}, set Foo(val){}}; // ok - types agree (inference) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var o2 = {get Foo(){return 0;}, set Foo(val:number){}}; // ok - types agree ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/giant.errors.txt b/tests/baselines/reference/giant.errors.txt index 9f15a5061a3..01ddc29ea05 100644 --- a/tests/baselines/reference/giant.errors.txt +++ b/tests/baselines/reference/giant.errors.txt @@ -1,3 +1,232 @@ +tests/cases/compiler/giant.ts(25,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(27,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(29,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(31,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(35,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(37,1): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(61,6): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/giant.ts(62,5): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/giant.ts(63,6): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/giant.ts(89,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(91,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(93,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(95,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(99,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(101,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(125,10): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/giant.ts(126,9): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/giant.ts(127,10): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/giant.ts(154,39): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(168,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(170,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(172,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(174,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(178,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(180,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(204,10): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/giant.ts(205,9): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/giant.ts(206,10): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/giant.ts(233,39): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(238,35): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(240,24): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(243,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(244,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(245,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(246,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(247,31): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(248,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(249,23): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(250,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(251,32): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(252,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(254,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(255,31): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(256,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(257,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(258,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(262,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(262,25): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(267,30): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(267,33): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(283,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(285,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(287,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(289,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(293,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(295,1): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(319,6): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/giant.ts(320,5): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/giant.ts(321,6): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/giant.ts(347,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(349,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(351,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(353,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(357,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(359,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(383,10): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/giant.ts(384,9): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/giant.ts(385,10): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/giant.ts(412,39): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(426,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(428,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(430,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(432,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(436,9): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(438,5): error TS1005: '{' expected. +tests/cases/compiler/giant.ts(462,10): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/giant.ts(463,9): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/giant.ts(464,10): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/giant.ts(491,39): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(496,35): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(498,24): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(501,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(502,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(503,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(504,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(505,31): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(506,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(507,23): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(508,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(509,32): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(510,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(512,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(513,31): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(514,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(515,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(516,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(520,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(520,25): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(525,30): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(525,33): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(532,31): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(534,20): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(537,17): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(538,18): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(539,18): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(540,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(541,27): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(542,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(543,19): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(544,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(545,28): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(546,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(548,17): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(549,27): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(550,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(551,18): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(552,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(556,18): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(556,21): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(558,24): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(561,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(563,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(587,10): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/giant.ts(588,9): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/giant.ts(589,10): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/giant.ts(606,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(606,25): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(611,30): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(611,33): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(615,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/giant.ts(616,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/giant.ts(616,39): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(616,42): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(617,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/giant.ts(618,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/giant.ts(621,26): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(621,29): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(623,24): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(626,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(628,21): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(653,10): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/giant.ts(654,9): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/giant.ts(655,10): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/giant.ts(672,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(672,25): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(676,30): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(676,33): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(24,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(24,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(26,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(28,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(28,17): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(30,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(34,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(36,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(36,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(76,5): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/giant.ts(88,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(88,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(90,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(92,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(92,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(94,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(98,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(100,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(100,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(140,9): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/giant.ts(167,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(167,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(169,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(171,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(171,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(173,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(177,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(179,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(179,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(219,9): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/giant.ts(246,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(248,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(250,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(252,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(256,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(258,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(282,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(282,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(284,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(286,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(286,17): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(288,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(292,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(294,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(294,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(334,5): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/giant.ts(346,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(346,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(348,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(350,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(350,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(352,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(356,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(358,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(358,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(398,9): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/giant.ts(425,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(425,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(427,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(429,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(429,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(431,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(435,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(437,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(437,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/giant.ts(477,9): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/giant.ts(504,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(506,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(508,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(510,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(514,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(516,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(540,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(542,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(544,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(546,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(550,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(552,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(602,9): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all be optional or required. + + ==== tests/cases/compiler/giant.ts (227 errors) ==== /* @@ -24,48 +253,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. interface I { //Call Signature (); @@ -91,13 +320,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -112,7 +341,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } module M { var V; @@ -126,48 +355,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. interface I { //Call Signature (); @@ -193,13 +422,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -214,7 +443,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } module M { var V; @@ -230,7 +459,7 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { }; export declare module eaM { }; } @@ -245,48 +474,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. export interface eI { //Call Signature (); @@ -312,13 +541,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -333,7 +562,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } export module eM { var V; @@ -349,95 +578,95 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { }; export declare module eaM { }; } export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private rF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public pgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public get pgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public set psF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private get rgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private set rsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static set tsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static get tgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { } interface I { } module M { } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -454,48 +683,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. export interface eI { //Call Signature (); @@ -521,13 +750,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -542,7 +771,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } export module eM { var V; @@ -556,48 +785,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. interface I { //Call Signature (); @@ -623,13 +852,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -644,7 +873,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } module M { var V; @@ -660,7 +889,7 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { }; export declare module eaM { }; } @@ -675,48 +904,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. export interface eI { //Call Signature (); @@ -742,13 +971,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -763,7 +992,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } export module eM { var V; @@ -779,95 +1008,95 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { }; export declare module eaM { }; } export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private rF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public pgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public get pgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public set psF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private get rgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private set rsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static set tsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static get tgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { } interface I { } module M { } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -876,92 +1105,92 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private rF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public pgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public get pgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public set psF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private get rgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private set rsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static set tsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static get tgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tV; static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. } interface I { //Call Signature @@ -987,13 +1216,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -1008,63 +1237,63 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } module M { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { } interface I { } module M { } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { } export interface eI { } export module eM { } export declare var eaV ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. export declare function eaF() { }; ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export declare class eaC { } ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. export declare module eaM { } ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tV static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. } export interface eI { //Call Signature @@ -1091,13 +1320,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -1112,23 +1341,23 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } export module eM { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { } module M { } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { } export interface eI { } export module eM { } diff --git a/tests/baselines/reference/grammarAmbiguities.errors.txt b/tests/baselines/reference/grammarAmbiguities.errors.txt index ac6cadc92e4..3d21f10de7b 100644 --- a/tests/baselines/reference/grammarAmbiguities.errors.txt +++ b/tests/baselines/reference/grammarAmbiguities.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/expressions/functionCalls/grammarAmbiguities.ts(8,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/expressions/functionCalls/grammarAmbiguities.ts(9,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/expressions/functionCalls/grammarAmbiguities.ts (2 errors) ==== function f(n: any) { return null; } function g(x: any) { return null; } @@ -8,9 +12,9 @@ f(g(7)); f(g < A, B > 7); // Should error ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. f(g < A, B > +(7)); // Should error ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/grammarAmbiguities1.errors.txt b/tests/baselines/reference/grammarAmbiguities1.errors.txt index 0c52ec2c98a..12df5f3c1e0 100644 --- a/tests/baselines/reference/grammarAmbiguities1.errors.txt +++ b/tests/baselines/reference/grammarAmbiguities1.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/grammarAmbiguities1.ts(8,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/grammarAmbiguities1.ts(8,3): error TS2365: Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. +tests/cases/compiler/grammarAmbiguities1.ts(8,10): error TS2365: Operator '>' cannot be applied to types 'typeof B' and 'number'. +tests/cases/compiler/grammarAmbiguities1.ts(9,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/grammarAmbiguities1.ts(9,3): error TS2365: Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. +tests/cases/compiler/grammarAmbiguities1.ts(9,10): error TS2365: Operator '>' cannot be applied to types 'typeof B' and 'number'. + + ==== tests/cases/compiler/grammarAmbiguities1.ts (6 errors) ==== class A { foo() { } } class B { bar() { }} @@ -8,16 +16,16 @@ f(g(7)); f(g < A, B > 7); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~ -!!! Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. +!!! error TS2365: Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. ~~~~~ -!!! Operator '>' cannot be applied to types 'typeof B' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'typeof B' and 'number'. f(g < A, B > +(7)); ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~ -!!! Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. +!!! error TS2365: Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. ~~~~~~~~ -!!! Operator '>' cannot be applied to types 'typeof B' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'typeof B' and 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt index 0eaf7593c56..072d06e8686 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/heterogeneousArrayAndOverloads.ts(9,19): error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'string[]'. + Type '{}' is not assignable to type 'string'. + + ==== tests/cases/compiler/heterogeneousArrayAndOverloads.ts (1 errors) ==== class arrTest { test(arg1: number[]); @@ -9,7 +13,7 @@ this.test([]); this.test([1, 2, "hi", 5]); // Error ~~~~~~~~~~~~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type 'string[]'. -!!! Type '{}' is not assignable to type 'string'. +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'string[]'. +!!! error TS2345: Type '{}' is not assignable to type 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/i3.errors.txt b/tests/baselines/reference/i3.errors.txt index ebdf371ab36..5d8b3b3fabf 100644 --- a/tests/baselines/reference/i3.errors.txt +++ b/tests/baselines/reference/i3.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/i3.ts(6,1): error TS2322: Type 'I3' is not assignable to type '{ one: number; }': + Required property 'one' cannot be reimplemented with optional property in 'I3'. + + ==== tests/cases/compiler/i3.ts (1 errors) ==== interface I3 { one?: number; }; var x: {one: number}; @@ -6,5 +10,5 @@ i = x; x = i; ~ -!!! Type 'I3' is not assignable to type '{ one: number; }': -!!! Required property 'one' cannot be reimplemented with optional property in 'I3'. \ No newline at end of file +!!! error TS2322: Type 'I3' is not assignable to type '{ one: number; }': +!!! error TS2322: Required property 'one' cannot be reimplemented with optional property in 'I3'. \ No newline at end of file diff --git a/tests/baselines/reference/identityForSignaturesWithTypeParametersAndAny.errors.txt b/tests/baselines/reference/identityForSignaturesWithTypeParametersAndAny.errors.txt index 034bfe3026d..60239280226 100644 --- a/tests/baselines/reference/identityForSignaturesWithTypeParametersAndAny.errors.txt +++ b/tests/baselines/reference/identityForSignaturesWithTypeParametersAndAny.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts(5,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'g' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. +tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'h' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. +tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: string) => any'. +tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts(14,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'j' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => string'. + + ==== tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts (4 errors) ==== var f: (x: T, y: U) => T; var f: (x: any, y: any) => any; @@ -5,19 +11,19 @@ var g: (x: T, y: U) => T; var g: (x: any, y: any) => any; ~ -!!! Subsequent variable declarations must have the same type. Variable 'g' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'g' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. var h: (x: T, y: U) => T; var h: (x: any, y: any) => any; ~ -!!! Subsequent variable declarations must have the same type. Variable 'h' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'h' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. var i: (x: T, y: U) => T; var i: (x: any, y: string) => any; ~ -!!! Subsequent variable declarations must have the same type. Variable 'i' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: string) => any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: string) => any'. var j: (x: T, y: U) => T; var j: (x: any, y: any) => string; ~ -!!! Subsequent variable declarations must have the same type. Variable 'j' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => string'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'j' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/ifElseWithStatements1.errors.txt b/tests/baselines/reference/ifElseWithStatements1.errors.txt index ccadfd14ce7..186cff59241 100644 --- a/tests/baselines/reference/ifElseWithStatements1.errors.txt +++ b/tests/baselines/reference/ifElseWithStatements1.errors.txt @@ -1,12 +1,16 @@ +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 (2 errors) ==== if (true) f(); ~ -!!! Cannot find name 'f'. +!!! error TS2304: Cannot find name 'f'. else f(); ~ -!!! Cannot find name 'f'. +!!! error TS2304: Cannot find name 'f'. function foo(): boolean { if (true) diff --git a/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt b/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt index 038d2ad7da5..eb373ad2fae 100644 --- a/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt +++ b/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/illegalModifiersOnClassElements.ts(2,5): error TS1031: 'declare' modifier cannot appear on a class element. +tests/cases/compiler/illegalModifiersOnClassElements.ts(3,5): error TS1031: 'export' modifier cannot appear on a class element. + + ==== tests/cases/compiler/illegalModifiersOnClassElements.ts (2 errors) ==== class C { declare foo = 1; ~~~~~~~ -!!! 'declare' modifier cannot appear on a class element. +!!! error TS1031: 'declare' modifier cannot appear on a class element. export bar = 1; ~~~~~~ -!!! 'export' modifier cannot appear on a class element. +!!! error TS1031: 'export' modifier cannot appear on a class element. } \ No newline at end of file diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt b/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt index 41e124d7f14..6b86209b5b1 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt @@ -1,3 +1,13 @@ +tests/cases/compiler/illegalSuperCallsInConstructor.ts(11,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/illegalSuperCallsInConstructor.ts(15,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/illegalSuperCallsInConstructor.ts(6,5): error TS2377: Constructors for derived classes must contain a 'super' call. +tests/cases/compiler/illegalSuperCallsInConstructor.ts(7,24): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/compiler/illegalSuperCallsInConstructor.ts(8,26): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/compiler/illegalSuperCallsInConstructor.ts(9,32): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/compiler/illegalSuperCallsInConstructor.ts(12,17): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors +tests/cases/compiler/illegalSuperCallsInConstructor.ts(16,17): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors + + ==== tests/cases/compiler/illegalSuperCallsInConstructor.ts (8 errors) ==== class Base { x: string; @@ -9,42 +19,42 @@ var r2 = () => super(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors var r3 = () => { super(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors var r4 = function () { super(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors var r5 = { ~~~~~~~~~~~~~~~~~~ get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~~~ super(); ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors return 1; ~~~~~~~~~~~~~~~~~~~~~~~~~ }, ~~~~~~~~~~~~~~ set foo(v: number) { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ super(); ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } ~~~~~~~~~~~~~ } ~~~~~~~~~ } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } \ No newline at end of file diff --git a/tests/baselines/reference/implementClausePrecedingExtends.errors.txt b/tests/baselines/reference/implementClausePrecedingExtends.errors.txt index 997f49a9478..43baa8c8be7 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.errors.txt +++ b/tests/baselines/reference/implementClausePrecedingExtends.errors.txt @@ -1,10 +1,16 @@ +tests/cases/compiler/implementClausePrecedingExtends.ts(2,22): error TS1005: '{' expected. +tests/cases/compiler/implementClausePrecedingExtends.ts(2,32): error TS1005: ';' expected. +tests/cases/compiler/implementClausePrecedingExtends.ts(2,7): error TS2421: Class 'D' incorrectly implements interface 'C': + Property 'foo' is missing in type 'D'. + + ==== tests/cases/compiler/implementClausePrecedingExtends.ts (3 errors) ==== class C { foo: number } class D implements C extends C { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Class 'D' incorrectly implements interface 'C': -!!! Property 'foo' is missing in type 'D'. \ No newline at end of file +!!! error TS2421: Class 'D' incorrectly implements interface 'C': +!!! error TS2421: Property 'foo' is missing in type 'D'. \ No newline at end of file diff --git a/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt b/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt index 209749db465..4c2803b76ac 100644 --- a/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt +++ b/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/implementGenericWithMismatchedTypes.ts(7,7): error TS2421: Class 'C' incorrectly implements interface 'IFoo': + Types of property 'foo' are incompatible: + Type '(x: string) => number' is not assignable to type '(x: T) => T': + Types of parameters 'x' and 'x' are incompatible: + Type 'string' is not assignable to type 'T'. +tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': + Types of property 'foo' are incompatible: + Type '(x: Tstring) => number' is not assignable to type '(x: T) => T': + Type 'number' is not assignable to type 'T'. + + ==== tests/cases/compiler/implementGenericWithMismatchedTypes.ts (2 errors) ==== // no errors because in the derived types the best common type for T's value is Object // and that matches the original signature for assignability since we treat its T's as Object @@ -7,11 +18,11 @@ } class C implements IFoo { // error ~ -!!! Class 'C' incorrectly implements interface 'IFoo': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string) => number' is not assignable to type '(x: T) => T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2421: Class 'C' incorrectly implements interface 'IFoo': +!!! error TS2421: Types of property 'foo' are incompatible: +!!! error TS2421: Type '(x: string) => number' is not assignable to type '(x: T) => T': +!!! error TS2421: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2421: Type 'string' is not assignable to type 'T'. foo(x: string): number { return null; } @@ -22,10 +33,10 @@ } class C2 implements IFoo2 { // error ~~ -!!! Class 'C2' incorrectly implements interface 'IFoo2': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: Tstring) => number' is not assignable to type '(x: T) => T': -!!! Type 'number' is not assignable to type 'T'. +!!! error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': +!!! error TS2421: Types of property 'foo' are incompatible: +!!! error TS2421: Type '(x: Tstring) => number' is not assignable to type '(x: T) => T': +!!! error TS2421: Type 'number' is not assignable to type 'T'. foo(x: Tstring): number { return null; } diff --git a/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt b/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt index 25ffa123d77..b131ffbf333 100644 --- a/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt +++ b/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/implementPublicPropertyAsPrivate.ts(4,7): error TS2421: Class 'C' incorrectly implements interface 'I': + Private property 'x' cannot be reimplemented. + + ==== tests/cases/compiler/implementPublicPropertyAsPrivate.ts (1 errors) ==== interface I { x: number; } class C implements I { ~ -!!! Class 'C' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'C' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x = 0; // should raise error at class decl } \ No newline at end of file diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt index 22cbf1aacac..b2a41ed4d05 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(9,7): error TS2421: Class 'Bar' incorrectly implements interface 'I': + Property 'y' is missing in type 'Bar'. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(12,7): error TS2421: Class 'Bar2' incorrectly implements interface 'I': + Property 'x' is missing in type 'Bar2'. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(16,7): error TS2421: Class 'Bar3' incorrectly implements interface 'I': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(21,7): error TS2421: Class 'Bar4' incorrectly implements interface 'I': + Private property 'x' cannot be reimplemented. + + ==== tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts (4 errors) ==== class Foo { private x: string; @@ -9,29 +19,29 @@ class Bar implements I { // error ~~~ -!!! Class 'Bar' incorrectly implements interface 'I': -!!! Property 'y' is missing in type 'Bar'. +!!! error TS2421: Class 'Bar' incorrectly implements interface 'I': +!!! error TS2421: Property 'y' is missing in type 'Bar'. } class Bar2 implements I { // error ~~~~ -!!! Class 'Bar2' incorrectly implements interface 'I': -!!! Property 'x' is missing in type 'Bar2'. +!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': +!!! error TS2421: Property 'x' is missing in type 'Bar2'. y: number; } class Bar3 implements I { // error ~~~~ -!!! Class 'Bar3' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. x: string; y: number; } class Bar4 implements I { // error ~~~~ -!!! Class 'Bar4' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'Bar4' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x: string; y: number; } \ No newline at end of file diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt index 7598e2b6132..5333f34b98b 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt @@ -1,3 +1,33 @@ +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(13,7): error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(13,7): error TS2421: Class 'Bar2' incorrectly implements interface 'I': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(18,7): error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(18,7): error TS2421: Class 'Bar3' incorrectly implements interface 'I': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(42,11): error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(42,11): error TS2421: Class 'Bar2' incorrectly implements interface 'I': + Property 'z' is missing in type 'Bar2'. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(47,11): error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(47,11): error TS2421: Class 'Bar3' incorrectly implements interface 'I': + Property 'z' is missing in type 'Bar3'. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(67,11): error TS2421: Class 'Bar' incorrectly implements interface 'I': + Property 'y' is missing in type 'Bar'. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(73,14): error TS2341: Property 'Foo.x' is inaccessible. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(74,16): error TS2339: Property 'y' does not exist on type 'Bar'. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2421: Class 'Bar2' incorrectly implements interface 'I': + Property 'y' is missing in type 'Bar2'. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(81,11): error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(81,11): error TS2421: Class 'Bar3' incorrectly implements interface 'I': + Property 'y' is missing in type 'Bar3'. + + ==== tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts (15 errors) ==== class Foo { private x: string; @@ -13,22 +43,22 @@ class Bar2 extends Foo implements I { // error ~~~~ -!!! Class 'Bar2' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar2' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. x: string; y: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! Class 'Bar3' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar3' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x: string; y: number; } @@ -54,22 +84,22 @@ class Bar2 extends Foo implements I { // error ~~~~ -!!! Class 'Bar2' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar2' incorrectly implements interface 'I': -!!! Property 'z' is missing in type 'Bar2'. +!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': +!!! error TS2421: Property 'z' is missing in type 'Bar2'. x: string; y: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! Class 'Bar3' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar3' incorrectly implements interface 'I': -!!! Property 'z' is missing in type 'Bar3'. +!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': +!!! error TS2421: Property 'z' is missing in type 'Bar3'. private x: string; y: number; } @@ -91,8 +121,8 @@ class Bar extends Foo implements I { // error ~~~ -!!! Class 'Bar' incorrectly implements interface 'I': -!!! Property 'y' is missing in type 'Bar'. +!!! error TS2421: Class 'Bar' incorrectly implements interface 'I': +!!! error TS2421: Property 'y' is missing in type 'Bar'. z: number; } @@ -100,29 +130,29 @@ var r1 = b.z; var r2 = b.x; // error ~~~ -!!! Property 'Foo.x' is inaccessible. +!!! error TS2341: Property 'Foo.x' is inaccessible. var r3 = b.y; // error ~ -!!! Property 'y' does not exist on type 'Bar'. +!!! error TS2339: Property 'y' does not exist on type 'Bar'. class Bar2 extends Foo implements I { // error ~~~~ -!!! Class 'Bar2' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar2' incorrectly implements interface 'I': -!!! Property 'y' is missing in type 'Bar2'. +!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': +!!! error TS2421: Property 'y' is missing in type 'Bar2'. x: string; z: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! Class 'Bar3' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar3' incorrectly implements interface 'I': -!!! Property 'y' is missing in type 'Bar3'. +!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': +!!! error TS2421: Property 'y' is missing in type 'Bar3'. private x: string; z: number; } diff --git a/tests/baselines/reference/implementsClauseAlreadySeen.errors.txt b/tests/baselines/reference/implementsClauseAlreadySeen.errors.txt index 020a061fa66..ca06cf9bb73 100644 --- a/tests/baselines/reference/implementsClauseAlreadySeen.errors.txt +++ b/tests/baselines/reference/implementsClauseAlreadySeen.errors.txt @@ -1,19 +1,27 @@ +tests/cases/compiler/implementsClauseAlreadySeen.ts(4,22): error TS1005: '{' expected. +tests/cases/compiler/implementsClauseAlreadySeen.ts(4,33): error TS1005: ';' expected. +tests/cases/compiler/implementsClauseAlreadySeen.ts(4,35): error TS1005: ';' expected. +tests/cases/compiler/implementsClauseAlreadySeen.ts(5,11): error TS1005: ';' expected. +tests/cases/compiler/implementsClauseAlreadySeen.ts(4,22): error TS2304: Cannot find name 'implements'. +tests/cases/compiler/implementsClauseAlreadySeen.ts(5,5): error TS2304: Cannot find name 'baz'. + + ==== tests/cases/compiler/implementsClauseAlreadySeen.ts (6 errors) ==== class C { } class D implements C implements C { ~~~~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~~ -!!! Cannot find name 'implements'. +!!! error TS2304: Cannot find name 'implements'. baz() { } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~ -!!! Cannot find name 'baz'. +!!! error TS2304: Cannot find name 'baz'. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyAmbients.errors.txt b/tests/baselines/reference/implicitAnyAmbients.errors.txt index 99cd350286d..699bd4b7f34 100644 --- a/tests/baselines/reference/implicitAnyAmbients.errors.txt +++ b/tests/baselines/reference/implicitAnyAmbients.errors.txt @@ -1,45 +1,56 @@ +tests/cases/compiler/implicitAnyAmbients.ts(3,9): error TS7005: Variable 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyAmbients.ts(6,5): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyAmbients.ts(6,16): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyAmbients.ts(7,5): error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyAmbients.ts(11,9): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyAmbients.ts(12,9): error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyAmbients.ts(17,9): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyAmbients.ts(18,9): error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyAmbients.ts(23,13): error TS7005: Variable 'y' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyAmbients.ts (9 errors) ==== declare module m { var x; // error ~ -!!! Variable 'x' implicitly has an 'any' type. +!!! error TS7005: Variable 'x' implicitly has an 'any' type. var y: any; function f(x); // error ~~~~~~~~~~~~~~ -!!! 'f', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. function f2(x: any); // error ~~~~~~~~~~~~~~~~~~~~ -!!! 'f2', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type. function f3(x: any): any; interface I { foo(); // error ~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. foo2(x: any); // error ~~~~~~~~~~~~~ -!!! 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. foo3(x: any): any; } class C { foo(); // error ~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. foo2(x: any); // error ~~~~~~~~~~~~~ -!!! 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. foo3(x: any): any; } module n { var y; // error ~ -!!! Variable 'y' implicitly has an 'any' type. +!!! error TS7005: Variable 'y' implicitly has an 'any' type. } import m2 = n; diff --git a/tests/baselines/reference/implicitAnyCastedValue.errors.txt b/tests/baselines/reference/implicitAnyCastedValue.errors.txt index c0f887b04d8..4b88cb0a8b4 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.errors.txt +++ b/tests/baselines/reference/implicitAnyCastedValue.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/implicitAnyCastedValue.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/implicitAnyCastedValue.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/implicitAnyCastedValue.ts(32,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/implicitAnyCastedValue.ts(10,5): error TS7008: Member 'bar' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyCastedValue.ts(11,5): error TS7008: Member 'foo' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyCastedValue.ts(26,5): error TS7008: Member 'getValue' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyCastedValue.ts(41,1): error TS7010: 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyCastedValue.ts(53,24): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyCastedValue.ts(62,24): error TS7006: Parameter 'x' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyCastedValue.ts (9 errors) ==== var x = function () { return 0; // this should not be an error @@ -10,13 +21,13 @@ class C { bar = null; // this should be an error ~~~~~~~~~~~ -!!! Member 'bar' implicitly has an 'any' type. +!!! error TS7008: Member 'bar' implicitly has an 'any' type. foo = undefined; // this should be an error ~~~~~~~~~~~~~~~~ -!!! Member 'foo' implicitly has an 'any' type. +!!! error TS7008: Member 'foo' implicitly has an 'any' type. public get tempVar() { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; // this should not be an error } @@ -32,17 +43,17 @@ class C1 { getValue = null; // this should be an error ~~~~~~~~~~~~~~~~ -!!! Member 'getValue' implicitly has an 'any' type. +!!! error TS7008: Member 'getValue' implicitly has an 'any' type. public get castedGet() { ~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getValue; // this should not be an error } public get notCastedGet() { ~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getValue; // this should not be an error } } @@ -57,7 +68,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ -!!! 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. function returnTypeBar(): any { return null; // this should not be an error @@ -69,7 +80,7 @@ function multipleRets1(x) { // this should not be an error ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. if (x) { return 0; } @@ -80,7 +91,7 @@ function multipleRets2(x) { // this should not be an error ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. if (x) { return null; } diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt index db1e773c17c..34aa58c4199 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt @@ -1,31 +1,41 @@ +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(2,15): error TS7006: Parameter 'l1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(3,15): error TS7006: Parameter 'll1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(4,33): error TS7006: Parameter 'myParam' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(5,14): error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(8,15): error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(9,15): error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(10,15): error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts(11,15): error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts (8 errors) ==== // these should be errors for implicit any parameter var lambda = (l1) => { }; // Error at "l1" ~~ -!!! Parameter 'l1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'l1' implicitly has an 'any' type. var lambd2 = (ll1, ll2: string) => { } // Error at "ll1" ~~~ -!!! Parameter 'll1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'll1' implicitly has an 'any' type. var lamda3 = function myLambda3(myParam) { } ~~~~~~~ -!!! Parameter 'myParam' implicitly has an 'any' type. +!!! error TS7006: Parameter 'myParam' implicitly has an 'any' type. var lamda4 = () => { return null }; ~~~~~~~~~~~~~~~~~~~~~ -!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. // these should be error for implicit any return type var lambda5 = function temp() { return null; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'temp', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. var lambda6 = () => { return null; } ~~~~~~~~~~~~~~~~~~~~~~ -!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. var lambda7 = function temp() { return undefined; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'temp', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. var lambda8 = () => { return undefined; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. // this shouldn't be an error var lambda9 = () => { return 5; } diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.errors.txt b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.errors.txt index dffd6dac81c..57e9b70cf09 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.errors.txt @@ -1,26 +1,36 @@ +tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts(2,14): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts(3,25): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts(4,16): error TS7006: Parameter 'a' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts(4,19): error TS7006: Parameter 'b' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts(4,22): error TS7006: Parameter 'c' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts(5,16): error TS7019: Rest parameter 'args' implicitly has an 'any[]' type. +tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts(6,16): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts(6,25): error TS7006: Parameter 'w' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts (8 errors) ==== // these should be errors function foo(x) { }; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. function bar(x: number, y) { }; // error at "y"; no error at "x" ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. function func2(a, b, c) { }; // error at "a,b,c" ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. ~ -!!! Parameter 'b' implicitly has an 'any' type. +!!! error TS7006: Parameter 'b' implicitly has an 'any' type. ~ -!!! Parameter 'c' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c' implicitly has an 'any' type. function func3(...args) { }; // error at "args" ~~~~~~~ -!!! Rest parameter 'args' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'args' implicitly has an 'any[]' type. function func4(z= null, w= undefined) { }; // error at "z,w" ~~~~~~~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. ~~~~~~~~~~~~ -!!! Parameter 'w' implicitly has an 'any' type. +!!! error TS7006: Parameter 'w' implicitly has an 'any' type. // these shouldn't be errors function noError1(x= 3, y= 2) { }; diff --git a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType.errors.txt b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType.errors.txt index a6ed50b77f4..710bcd32470 100644 --- a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType.errors.txt @@ -1,26 +1,36 @@ +tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(3,5): error TS7008: Member 'member1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(5,5): error TS7010: 'constructor', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(5,17): error TS7006: Parameter 'c1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(5,33): error TS7006: Parameter 'c3' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(6,5): error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(6,17): error TS7006: Parameter 'f1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(6,21): error TS7006: Parameter 'f2' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(7,5): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts (8 errors) ==== // this should be an error interface IFace { member1; // error at "member1" ~~~~~~~~ -!!! Member 'member1' implicitly has an 'any' type. +!!! error TS7008: Member 'member1' implicitly has an 'any' type. member2: string; constructor(c1, c2: string, c3); // error at "c1, c3, "constructor" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'constructor', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'constructor', which lacks return-type annotation, implicitly has an 'any' return type. ~~ -!!! Parameter 'c1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c1' implicitly has an 'any' type. ~~ -!!! Parameter 'c3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c3' implicitly has an 'any' type. funcOfIFace(f1, f2, f3: number); // error at "f1, f2, funcOfIFace" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. ~~ -!!! Parameter 'f1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'f1' implicitly has an 'any' type. ~~ -!!! Parameter 'f2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'f2' implicitly has an 'any' type. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.errors.txt b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.errors.txt index c98f3d3c311..45b95a1c863 100644 --- a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.errors.txt @@ -1,20 +1,27 @@ +tests/cases/compiler/implicitAnyDeclareMemberWithoutType2.ts(3,5): error TS7008: Member 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType2.ts(6,17): error TS7006: Parameter 'c1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType2.ts(6,21): error TS7006: Parameter 'c2' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType2.ts(7,13): error TS7006: Parameter 'f1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareMemberWithoutType2.ts(7,17): error TS7006: Parameter 'f2' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyDeclareMemberWithoutType2.ts (5 errors) ==== // this should be an error class C { public x = null;// error at "x" ~~~~~~~~~~~~~~~~ -!!! Member 'x' implicitly has an 'any' type. +!!! error TS7008: Member 'x' implicitly has an 'any' type. public x1: string // no error constructor(c1, c2, c3: string) { } // error at "c1, c2" ~~ -!!! Parameter 'c1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c1' implicitly has an 'any' type. ~~ -!!! Parameter 'c2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c2' implicitly has an 'any' type. funcOfC(f1, f2, f3: number) { } // error at "f1,f2" ~~ -!!! Parameter 'f1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'f1' implicitly has an 'any' type. ~~ -!!! Parameter 'f2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'f2' implicitly has an 'any' type. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.errors.txt b/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.errors.txt index 9d1fa68e502..8523b361ba8 100644 --- a/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts(6,10): error TS7008: Member 'y' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts(6,13): error TS7008: Member 'z' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts(7,18): error TS7008: Member 'z1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts(8,12): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts(9,10): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts(10,22): error TS7006: Parameter 'y3' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts (6 errors) ==== class C { constructor() { } @@ -6,21 +14,21 @@ // this should be an error var x: { y; z; } // error at "y,z" ~~ -!!! Member 'y' implicitly has an 'any' type. +!!! error TS7008: Member 'y' implicitly has an 'any' type. ~~ -!!! Member 'z' implicitly has an 'any' type. +!!! error TS7008: Member 'z' implicitly has an 'any' type. var x1: { y1: C; z1; }; // error at "z1" ~~~ -!!! Member 'z1' implicitly has an 'any' type. +!!! error TS7008: Member 'z1' implicitly has an 'any' type. var x11: { new (); }; // error at "new" ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. var x2: (y2) => number; // error at "y2" ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. var x3: (x3: string, y3) => void ; // error at "y3" ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // this should not be an error var bar: { a: number; b: number }; diff --git a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt index 57e74c34a34..3acb6e47e10 100644 --- a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt @@ -1,14 +1,19 @@ +tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(2,5): error TS7005: Variable 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(3,13): error TS7005: Variable 'foo' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(4,15): error TS7006: Parameter 'k' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts (3 errors) ==== // this should be an error var x; // error at "x" ~ -!!! Variable 'x' implicitly has an 'any' type. +!!! error TS7005: Variable 'x' implicitly has an 'any' type. declare var foo; // error at "foo" ~~~ -!!! Variable 'foo' implicitly has an 'any' type. +!!! error TS7005: Variable 'foo' implicitly has an 'any' type. function func(k) { }; //error at "k" ~ -!!! Parameter 'k' implicitly has an 'any' type. +!!! error TS7006: Parameter 'k' implicitly has an 'any' type. func(x); // this shouldn't be an error diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt b/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt index 84366f86ec7..7b80d6405c9 100644 --- a/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt +++ b/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt @@ -1,27 +1,38 @@ +tests/cases/compiler/implicitAnyFromCircularInference.ts(3,5): error TS7021: 'a' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. +tests/cases/compiler/implicitAnyFromCircularInference.ts(7,5): error TS7021: 'c' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. +tests/cases/compiler/implicitAnyFromCircularInference.ts(10,5): error TS7021: 'd' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. +tests/cases/compiler/implicitAnyFromCircularInference.ts(15,10): error TS7023: 'g' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +tests/cases/compiler/implicitAnyFromCircularInference.ts(18,10): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +tests/cases/compiler/implicitAnyFromCircularInference.ts(23,10): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +tests/cases/compiler/implicitAnyFromCircularInference.ts(26,10): error TS7023: 'h' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +tests/cases/compiler/implicitAnyFromCircularInference.ts(41,5): error TS7022: 's' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer. +tests/cases/compiler/implicitAnyFromCircularInference.ts(46,5): error TS7023: 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. + + ==== tests/cases/compiler/implicitAnyFromCircularInference.ts (9 errors) ==== // Error expected var a: typeof a; ~ -!!! 'a' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. +!!! error TS7021: 'a' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. // Error expected on b or c var b: typeof c; var c: typeof b; ~ -!!! 'c' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. +!!! error TS7021: 'c' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. // Error expected var d: Array; ~ -!!! 'd' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. +!!! error TS7021: 'd' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. function f() { return f; } // Error expected function g() { return g(); } ~ -!!! 'g' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +!!! error TS7023: 'g' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. // Error expected var f1 = function () { @@ -30,17 +41,17 @@ ~~~~~~~~~~~~~~~~ }; ~ -!!! Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +!!! error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. // Error expected var f2 = () => f2(); ~~~~~~~~~~ -!!! Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +!!! error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. // Error expected function h() { ~ -!!! 'h' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +!!! error TS7023: 'h' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. return foo(); function foo() { return h() || "hello"; @@ -57,7 +68,7 @@ // Error expected s = foo(this); ~~~~~~~~~~~~~~ -!!! 's' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer. +!!! error TS7022: 's' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer. } class D { @@ -68,6 +79,6 @@ ~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +!!! error TS7023: 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt index cf135dbbd41..b15fb779b51 100644 --- a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt +++ b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt @@ -1,28 +1,37 @@ +tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(2,5): error TS7005: Variable 'arg0' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(3,5): error TS7005: Variable 'anyArray' implicitly has an 'any[]' type. +tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(4,13): error TS7008: Member 'v' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(4,16): error TS7008: Member 'w' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(5,13): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(6,16): error TS7006: Parameter 'arg1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(10,36): error TS7006: Parameter 'y2' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts (7 errors) ==== // this should be errors var arg0 = null; // error at "arg0" ~~~~ -!!! Variable 'arg0' implicitly has an 'any' type. +!!! error TS7005: Variable 'arg0' implicitly has an 'any' type. var anyArray = [null, undefined]; // error at array literal ~~~~~~~~ -!!! Variable 'anyArray' implicitly has an 'any[]' type. +!!! error TS7005: Variable 'anyArray' implicitly has an 'any[]' type. var objL: { v; w; } // error at "y,z" ~~ -!!! Member 'v' implicitly has an 'any' type. +!!! error TS7008: Member 'v' implicitly has an 'any' type. ~~ -!!! Member 'w' implicitly has an 'any' type. +!!! error TS7008: Member 'w' implicitly has an 'any' type. var funcL: (y2) => number; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. function temp1(arg1) { } // error at "temp1" ~~~~ -!!! Parameter 'arg1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'arg1' implicitly has an 'any' type. function testFunctionExprC(subReplace: (s: string, ...arg: any[]) => string) { } function testFunctionExprC2(eq: (v1: any, v2: any) => number) { }; function testObjLiteral(objLit: { v: any; w: any }) { }; function testFuncLiteral(funcLit: (y2) => number) { }; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. // this should not be an error testFunctionExprC2((v1, v2) => 1); diff --git a/tests/baselines/reference/implicitAnyFunctionOverloadWithImplicitAnyReturnType.errors.txt b/tests/baselines/reference/implicitAnyFunctionOverloadWithImplicitAnyReturnType.errors.txt index 6ef65b09ed9..ecd9cfde121 100644 --- a/tests/baselines/reference/implicitAnyFunctionOverloadWithImplicitAnyReturnType.errors.txt +++ b/tests/baselines/reference/implicitAnyFunctionOverloadWithImplicitAnyReturnType.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/implicitAnyFunctionOverloadWithImplicitAnyReturnType.ts(3,5): error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/implicitAnyFunctionOverloadWithImplicitAnyReturnType.ts (1 errors) ==== // this should be an error interface IFace { funcOfIFace(); // error at "f" ~~~~~~~~~~~~~~ -!!! 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. } // this should not be an error diff --git a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt index 5c8ab6e19a3..de1c57dd797 100644 --- a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt +++ b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt @@ -1,11 +1,17 @@ +tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(2,1): error TS7010: 'nullWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(3,1): error TS7010: 'undefinedWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(6,5): error TS7010: 'nullWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts(10,5): error TS7010: 'underfinedWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts (4 errors) ==== // this should be an error function nullWidenFunction() { return null;} // error at "nullWidenFunction" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'nullWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'nullWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. function undefinedWidenFunction() { return undefined; } // error at "undefinedWidenFunction" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'undefinedWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'undefinedWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. class C { nullWidenFuncOfC() { // error at "nullWidenFuncOfC" @@ -14,7 +20,7 @@ ~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'nullWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'nullWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. underfinedWidenFuncOfC() { // error at "underfinedWidenFuncOfC" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -22,7 +28,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'underfinedWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'underfinedWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. } // this should not be an error diff --git a/tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt b/tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt index 3f95e27ab0a..c479d06d898 100644 --- a/tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt +++ b/tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/implicitAnyGenericTypeInference.ts(7,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyGenericTypeInference.ts(7,22): error TS7006: Parameter 'y' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyGenericTypeInference.ts (2 errors) ==== interface Comparer { @@ -7,7 +11,7 @@ var c: Comparer; c = { compareTo: (x, y) => { return y; } }; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. var r = c.compareTo(1, ''); \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt index c3484202590..9f2dc9ce949 100644 --- a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt +++ b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt @@ -1,19 +1,29 @@ +tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(4,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(3,5): error TS7008: Member 'getAndSet' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,5): error TS7016: Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation. +tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,28): error TS7006: Parameter 'newXValue' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,5): error TS7010: 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts (8 errors) ==== // these should be errors class GetAndSet { getAndSet = null; // error at "getAndSet" ~~~~~~~~~~~~~~~~~ -!!! Member 'getAndSet' implicitly has an 'any' type. +!!! error TS7008: Member 'getAndSet' implicitly has an 'any' type. public get haveGetAndSet() { // this should not be an error ~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getAndSet; } // this shouldn't be an error public set haveGetAndSet(value) { // error at "value" ~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.getAndSet = value; } } @@ -21,23 +31,23 @@ class SetterOnly { public set haveOnlySet(newXValue) { // error at "haveOnlySet, newXValue" ~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ -!!! Parameter 'newXValue' implicitly has an 'any' type. +!!! error TS7006: Parameter 'newXValue' implicitly has an 'any' type. } ~~~~~ -!!! Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation. +!!! error TS7016: Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation. } class GetterOnly { public get haveOnlyGet() { // error at "haveOnlyGet" ~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return null; ~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyInAmbientDeclaration.errors.txt b/tests/baselines/reference/implicitAnyInAmbientDeclaration.errors.txt index 16ee2425d41..6ec975e33ea 100644 --- a/tests/baselines/reference/implicitAnyInAmbientDeclaration.errors.txt +++ b/tests/baselines/reference/implicitAnyInAmbientDeclaration.errors.txt @@ -1,19 +1,25 @@ +tests/cases/compiler/implicitAnyInAmbientDeclaration.ts(8,9): error TS1089: 'private' modifier cannot appear on a constructor declaration. +tests/cases/compiler/implicitAnyInAmbientDeclaration.ts(3,9): error TS7008: Member 'publicMember' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyInAmbientDeclaration.ts(6,9): error TS7010: 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyInAmbientDeclaration.ts(6,31): error TS7006: Parameter 'x' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyInAmbientDeclaration.ts (4 errors) ==== module Test { declare class C { public publicMember; // this should be an error ~~~~~~~~~~~~~~~~~~~~ -!!! Member 'publicMember' implicitly has an 'any' type. +!!! error TS7008: Member 'publicMember' implicitly has an 'any' type. private privateMember; // this should not be an error public publicFunction(x); // this should be an error ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. private privateFunction(privateParam); // this should not be an error private constructor(privateParam); ~~~~~~~ -!!! 'private' modifier cannot appear on a constructor declaration. +!!! error TS1089: 'private' modifier cannot appear on a constructor declaration. } } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt b/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt index c65b2e49340..726c408aced 100644 --- a/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt +++ b/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt @@ -1,31 +1,41 @@ +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(9,5): error TS1089: 'private' modifier cannot appear on a constructor declaration. +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(1,1): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(1,22): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(2,13): error TS7005: Variable 'bar' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(4,5): error TS7008: Member 'publicMember' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(7,5): error TS7010: 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(7,27): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts(13,24): error TS7006: Parameter 'publicConsParam' implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts (8 errors) ==== declare function foo(x); // this should be an error ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. declare var bar; // this should be be an erro ~~~ -!!! Variable 'bar' implicitly has an 'any' type. +!!! error TS7005: Variable 'bar' implicitly has an 'any' type. declare class C { public publicMember; // this should be an error ~~~~~~~~~~~~~~~~~~~~ -!!! Member 'publicMember' implicitly has an 'any' type. +!!! error TS7008: Member 'publicMember' implicitly has an 'any' type. private privateMember; // this should not be an error public publicFunction(x); // this should be an error ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. private privateFunction(privateParam); // this should not be an error private constructor(privateParam); // this should not be an error ~~~~~~~ -!!! 'private' modifier cannot appear on a constructor declaration. +!!! error TS1089: 'private' modifier cannot appear on a constructor declaration. } declare class D { public constructor(publicConsParam, int: number); // this should be an error ~~~~~~~~~~~~~~~ -!!! Parameter 'publicConsParam' implicitly has an 'any' type. +!!! error TS7006: Parameter 'publicConsParam' implicitly has an 'any' type. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.errors.txt b/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.errors.txt index d78cf0d5b4b..e623cae18d8 100644 --- a/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.errors.txt +++ b/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/implicitAnyNewExprLackConstructorSignature.ts(2,14): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. + + ==== tests/cases/compiler/implicitAnyNewExprLackConstructorSignature.ts (1 errors) ==== function Point() { this.x = 3; } var x: any = new Point(); // error at "new" ~~~~~~~~~~~ -!!! 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. \ No newline at end of file +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyWidenToAny.errors.txt b/tests/baselines/reference/implicitAnyWidenToAny.errors.txt index b9e5cbf1a1e..3b86c52c2ea 100644 --- a/tests/baselines/reference/implicitAnyWidenToAny.errors.txt +++ b/tests/baselines/reference/implicitAnyWidenToAny.errors.txt @@ -1,17 +1,23 @@ +tests/cases/compiler/implicitAnyWidenToAny.ts(2,5): error TS7005: Variable 'x' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyWidenToAny.ts(3,5): error TS7005: Variable 'x1' implicitly has an 'any' type. +tests/cases/compiler/implicitAnyWidenToAny.ts(4,5): error TS7005: Variable 'widenArray' implicitly has an 'any[]' type. +tests/cases/compiler/implicitAnyWidenToAny.ts(5,5): error TS7005: Variable 'emptyArray' implicitly has an 'any[]' type. + + ==== tests/cases/compiler/implicitAnyWidenToAny.ts (4 errors) ==== // these should be errors var x = null; // error at "x" ~ -!!! Variable 'x' implicitly has an 'any' type. +!!! error TS7005: Variable 'x' implicitly has an 'any' type. var x1 = undefined; // error at "x1" ~~ -!!! Variable 'x1' implicitly has an 'any' type. +!!! error TS7005: Variable 'x1' implicitly has an 'any' type. var widenArray = [null, undefined]; // error at "widenArray" ~~~~~~~~~~ -!!! Variable 'widenArray' implicitly has an 'any[]' type. +!!! error TS7005: Variable 'widenArray' implicitly has an 'any[]' type. var emptyArray = []; // error at "emptyArray" ~~~~~~~~~~ -!!! Variable 'emptyArray' implicitly has an 'any[]' type. +!!! error TS7005: Variable 'emptyArray' implicitly has an 'any[]' type. // these should not be error class AnimalObj { diff --git a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt index 3960281c7d4..abd9ee65196 100644 --- a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt +++ b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts (0 errors) ==== import r = require('importAliasAnExternalModuleInsideAnInternalModule_file0'); module m_private { @@ -9,7 +12,7 @@ ==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts (1 errors) ==== export module m { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export function foo() { } } \ No newline at end of file diff --git a/tests/baselines/reference/importAnImport.errors.txt b/tests/baselines/reference/importAnImport.errors.txt index 147b856685e..662655d3a3e 100644 --- a/tests/baselines/reference/importAnImport.errors.txt +++ b/tests/baselines/reference/importAnImport.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/importAnImport.ts(6,5): error TS2305: Module 'c.a.b' has no exported member 'ma'. + + ==== tests/cases/compiler/importAnImport.ts (1 errors) ==== module c.a.b { import ma = a; @@ -6,5 +9,5 @@ module m0 { import m8 = c.a.b.ma; ~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'c.a.b' has no exported member 'ma'. +!!! error TS2305: Module 'c.a.b' has no exported member 'ma'. } \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt index faf8a4bfe73..cae8612481a 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/importAndVariableDeclarationConflict1.ts(5,1): error TS2440: Import declaration conflicts with local declaration of 'x' + + ==== tests/cases/compiler/importAndVariableDeclarationConflict1.ts (1 errors) ==== module m { export var m = ''; @@ -5,6 +8,6 @@ import x = m.m; ~~~~~~~~~~~~~~~ -!!! Import declaration conflicts with local declaration of 'x' +!!! error TS2440: Import declaration conflicts with local declaration of 'x' var x = ''; \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt index 53ec5b64fac..739ca67724f 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/importAndVariableDeclarationConflict3.ts(6,8): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/compiler/importAndVariableDeclarationConflict3.ts (1 errors) ==== module m { export var m = ''; @@ -6,5 +9,5 @@ import x = m.m; import x = m.m; ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt index edef13b1a26..4905d4d2a73 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/importAndVariableDeclarationConflict4.ts(6,1): error TS2440: Import declaration conflicts with local declaration of 'x' + + ==== tests/cases/compiler/importAndVariableDeclarationConflict4.ts (1 errors) ==== module m { export var m = ''; @@ -6,5 +9,5 @@ var x = ''; import x = m.m; ~~~~~~~~~~~~~~~ -!!! Import declaration conflicts with local declaration of 'x' +!!! error TS2440: Import declaration conflicts with local declaration of 'x' \ No newline at end of file diff --git a/tests/baselines/reference/importAsBaseClass.errors.txt b/tests/baselines/reference/importAsBaseClass.errors.txt index e9cd8590cbc..f09eb55561b 100644 --- a/tests/baselines/reference/importAsBaseClass.errors.txt +++ b/tests/baselines/reference/importAsBaseClass.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/importAsBaseClass_1.ts(2,21): error TS2304: Cannot find name 'Greeter'. + + ==== tests/cases/compiler/importAsBaseClass_1.ts (1 errors) ==== import Greeter = require("importAsBaseClass_0"); class Hello extends Greeter { } ~~~~~~~ -!!! Cannot find name 'Greeter'. +!!! error TS2304: Cannot find name 'Greeter'. ==== tests/cases/compiler/importAsBaseClass_0.ts (0 errors) ==== export class Greeter { diff --git a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt index 9cb444661b9..7603a694348 100644 --- a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt +++ b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt @@ -1,14 +1,20 @@ +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find external module 'externalModule'. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(2,16): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find external module 'externalModule'. + + ==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (4 errors) ==== import b = require("externalModule"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~~~~~~ -!!! Cannot find external module 'externalModule'. +!!! error TS2307: Cannot find external module 'externalModule'. declare module "m1" { ~~~~ -!!! Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient external modules cannot be nested in other modules. import im2 = require("externalModule"); ~~~~~~~~~~~~~~~~ -!!! Cannot find external module 'externalModule'. +!!! error TS2307: Cannot find external module 'externalModule'. } \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithClassModifiers.errors.txt b/tests/baselines/reference/importDeclWithClassModifiers.errors.txt index 081bebda446..7555ac366c4 100644 --- a/tests/baselines/reference/importDeclWithClassModifiers.errors.txt +++ b/tests/baselines/reference/importDeclWithClassModifiers.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/importDeclWithClassModifiers.ts(5,8): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/compiler/importDeclWithClassModifiers.ts(6,8): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/compiler/importDeclWithClassModifiers.ts(7,8): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/compiler/importDeclWithClassModifiers.ts(5,1): error TS2305: Module 'x' has no exported member 'c'. +tests/cases/compiler/importDeclWithClassModifiers.ts(6,1): error TS2305: Module 'x' has no exported member 'c'. +tests/cases/compiler/importDeclWithClassModifiers.ts(7,1): error TS2305: Module 'x' has no exported member 'c'. + + ==== tests/cases/compiler/importDeclWithClassModifiers.ts (6 errors) ==== module x { interface c { @@ -5,18 +13,18 @@ } export public import a = x.c; ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. export private import b = x.c; ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. export static import c = x.c; ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt b/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt index 972a1b9cc77..8aeb64291a6 100644 --- a/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt +++ b/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1079: A 'declare' modifier cannot be used with an import declaration. +tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/importDeclWithDeclareModifier.ts(5,9): error TS1029: 'export' modifier must precede 'declare' modifier. +tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS2305: Module 'x' has no exported member 'c'. + + ==== tests/cases/compiler/importDeclWithDeclareModifier.ts (4 errors) ==== module x { interface c { @@ -5,12 +11,12 @@ } declare export import a = x.c; ~~~~~~~ -!!! A 'declare' modifier cannot be used with an import declaration. +!!! error TS1079: A 'declare' modifier cannot be used with an import declaration. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~ -!!! 'export' modifier must precede 'declare' modifier. +!!! error TS1029: 'export' modifier must precede 'declare' modifier. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithDeclareModifierInAmbientContext.errors.txt b/tests/baselines/reference/importDeclWithDeclareModifierInAmbientContext.errors.txt index 38c3d97185c..9773b293037 100644 --- a/tests/baselines/reference/importDeclWithDeclareModifierInAmbientContext.errors.txt +++ b/tests/baselines/reference/importDeclWithDeclareModifierInAmbientContext.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/importDeclWithDeclareModifierInAmbientContext.ts(6,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +tests/cases/compiler/importDeclWithDeclareModifierInAmbientContext.ts(6,5): error TS1079: A 'declare' modifier cannot be used with an import declaration. +tests/cases/compiler/importDeclWithDeclareModifierInAmbientContext.ts(6,13): error TS1029: 'export' modifier must precede 'declare' modifier. + + ==== tests/cases/compiler/importDeclWithDeclareModifierInAmbientContext.ts (3 errors) ==== declare module "m" { module x { @@ -6,11 +11,11 @@ } declare export import a = x.c; ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~~~~~ -!!! A 'declare' modifier cannot be used with an import declaration. +!!! error TS1079: A 'declare' modifier cannot be used with an import declaration. ~~~~~~ -!!! 'export' modifier must precede 'declare' modifier. +!!! error TS1029: 'export' modifier must precede 'declare' modifier. var b: a; } \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithExportModifier.errors.txt b/tests/baselines/reference/importDeclWithExportModifier.errors.txt index ffa48b8a523..e1d75496a39 100644 --- a/tests/baselines/reference/importDeclWithExportModifier.errors.txt +++ b/tests/baselines/reference/importDeclWithExportModifier.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/importDeclWithExportModifier.ts(5,1): error TS2305: Module 'x' has no exported member 'c'. + + ==== tests/cases/compiler/importDeclWithExportModifier.ts (1 errors) ==== module x { interface c { @@ -5,6 +8,6 @@ } export import a = x.c; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt index 9c66bc3ca42..b7d938fbd58 100644 --- a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt +++ b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(5,1): error TS2305: Module 'x' has no exported member 'c'. +tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts(6,1): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts (2 errors) ==== module x { interface c { @@ -5,7 +9,7 @@ } export import a = x.c; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. export = x; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt index 5dc48436ad7..19fe8d55955 100644 --- a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt +++ b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts(7,5): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts (1 errors) ==== declare module "m" { module x { @@ -7,5 +10,5 @@ export import a = x.c; export = x; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } \ No newline at end of file diff --git a/tests/baselines/reference/importInsideModule.errors.txt b/tests/baselines/reference/importInsideModule.errors.txt index 38f09c07cf2..dc89bb5e9ca 100644 --- a/tests/baselines/reference/importInsideModule.errors.txt +++ b/tests/baselines/reference/importInsideModule.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/importInsideModule_file2.ts(2,5): error TS1147: Import declarations in an internal module cannot reference an external module. +tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot find external module 'importInsideModule_file1'. + + ==== tests/cases/compiler/importInsideModule_file2.ts (2 errors) ==== export module myModule { import foo = require("importInsideModule_file1"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in an internal module cannot reference an external module. ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot find external module 'importInsideModule_file1'. +!!! error TS2307: Cannot find external module 'importInsideModule_file1'. var a = foo.x; } ==== tests/cases/compiler/importInsideModule_file1.ts (0 errors) ==== diff --git a/tests/baselines/reference/importNonExternalModule.errors.txt b/tests/baselines/reference/importNonExternalModule.errors.txt index 6abcf7ac44b..bce2c86d0f0 100644 --- a/tests/baselines/reference/importNonExternalModule.errors.txt +++ b/tests/baselines/reference/importNonExternalModule.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2306: File 'tests/cases/conformance/externalModules/foo_0.ts' is not an external module. + + ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require("./foo_0"); ~~~~~~~~~ -!!! File 'foo_0.ts' is not an external module. +!!! error TS2306: File 'foo_0.ts' is not an external module. // Import should fail. foo_0 not an external module if(foo.answer === 42){ diff --git a/tests/baselines/reference/importNonStringLiteral.errors.txt b/tests/baselines/reference/importNonStringLiteral.errors.txt index 0c1c2fde046..ce3dbb3e1ec 100644 --- a/tests/baselines/reference/importNonStringLiteral.errors.txt +++ b/tests/baselines/reference/importNonStringLiteral.errors.txt @@ -1,8 +1,12 @@ +tests/cases/conformance/externalModules/importNonStringLiteral.ts(2,22): error TS1141: String literal expected. +tests/cases/conformance/externalModules/importNonStringLiteral.ts(2,23): error TS1005: ';' expected. + + ==== tests/cases/conformance/externalModules/importNonStringLiteral.ts (2 errors) ==== var x = "filename"; import foo = require(x); // invalid ~ -!!! String literal expected. +!!! error TS1141: String literal expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/importStatementsInterfaces.errors.txt b/tests/baselines/reference/importStatementsInterfaces.errors.txt index 95a733dc2c4..313365fb191 100644 --- a/tests/baselines/reference/importStatementsInterfaces.errors.txt +++ b/tests/baselines/reference/importStatementsInterfaces.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts(23,19): error TS2304: Cannot find name 'a'. + + ==== tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts (1 errors) ==== module A { export interface Point { @@ -23,7 +26,7 @@ import b = a.inA; var m: typeof a; ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. var p: b.Point3D; var p = {x:0, y:0, z: 0 }; } diff --git a/tests/baselines/reference/importTsBeforeDTs.errors.txt b/tests/baselines/reference/importTsBeforeDTs.errors.txt index 58e72634573..aaee4e3d070 100644 --- a/tests/baselines/reference/importTsBeforeDTs.errors.txt +++ b/tests/baselines/reference/importTsBeforeDTs.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/externalModules/foo_1.ts(2,14): error TS2339: Property 'x' does not exist on type 'typeof "tests/cases/conformance/externalModules/foo_0"'. + + ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require("./foo_0"); var z1 = foo.x + 10; // Should error, as .ts preferred over .d.ts ~ -!!! Property 'x' does not exist on type 'typeof "tests/cases/conformance/externalModules/foo_0"'. +!!! error TS2339: Property 'x' does not exist on type 'typeof "tests/cases/conformance/externalModules/foo_0"'. var z2 = foo.y + 10; // Should resolve ==== tests/cases/conformance/externalModules/foo_0.d.ts (0 errors) ==== diff --git a/tests/baselines/reference/importedModuleAddToGlobal.errors.txt b/tests/baselines/reference/importedModuleAddToGlobal.errors.txt index d6989e5b3b9..2ffd16ecbf2 100644 --- a/tests/baselines/reference/importedModuleAddToGlobal.errors.txt +++ b/tests/baselines/reference/importedModuleAddToGlobal.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/importedModuleAddToGlobal.ts(15,23): error TS2304: Cannot find name 'b'. + + ==== tests/cases/compiler/importedModuleAddToGlobal.ts (1 errors) ==== // Binding for an import statement in a typeref position is being added to the global scope // Shouldn't compile b.B is not defined in C @@ -15,5 +18,5 @@ import a = A; function hello(): b.B { return null; } ~~~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. } \ No newline at end of file diff --git a/tests/baselines/reference/inOperator.errors.txt b/tests/baselines/reference/inOperator.errors.txt index 83f11b759e5..7c9c874ea19 100644 --- a/tests/baselines/reference/inOperator.errors.txt +++ b/tests/baselines/reference/inOperator.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/inOperator.ts(7,15): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter + + ==== tests/cases/compiler/inOperator.ts (1 errors) ==== var a=[]; @@ -7,7 +10,7 @@ var b = '' in 0; ~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var c: any; var y: number; diff --git a/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt index cb65a412006..9411d016dcb 100644 --- a/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt @@ -1,3 +1,25 @@ +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(12,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(13,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(14,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(15,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(16,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(17,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(18,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(19,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(20,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(29,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(30,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(31,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(32,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(33,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(34,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(35,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(36,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(37,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(40,11): error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(40,17): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter + + ==== tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts (20 errors) ==== enum E { a } @@ -12,31 +34,31 @@ var ra1 = a1 in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra2 = a2 in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra3 = a3 in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra4 = a4 in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra5 = null in x; ~~~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra6 = undefined in x; ~~~~~~~~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra7 = E.a in x; ~~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra8 = false in x; ~~~~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra9 = {} in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. // invalid right operands // the right operand is required to be of type Any, an object type, or a type parameter type @@ -47,35 +69,35 @@ var rb1 = x in b1; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb2 = x in b2; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb3 = x in b3; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb4 = x in b4; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb5 = x in 0; ~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb6 = x in false; ~~~~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb7 = x in ''; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb8 = x in null; ~~~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb9 = x in undefined; ~~~~~~~~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter // both operands are invalid var rc1 = {} in ''; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter \ No newline at end of file +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleExports1.errors.txt b/tests/baselines/reference/incompatibleExports1.errors.txt index 99a35e122bb..6371bfc5377 100644 --- a/tests/baselines/reference/incompatibleExports1.errors.txt +++ b/tests/baselines/reference/incompatibleExports1.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/incompatibleExports1.ts(4,5): error TS2309: An export assignment cannot be used in a module with other exported elements. +tests/cases/compiler/incompatibleExports1.ts(16,5): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/compiler/incompatibleExports1.ts (2 errors) ==== declare module "foo" { export interface x { a: string } interface y { a: Date } export = y; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } declare module "baz" { @@ -18,6 +22,6 @@ export = c; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleExports2.errors.txt b/tests/baselines/reference/incompatibleExports2.errors.txt index a809d70feb7..0ea5a35cf62 100644 --- a/tests/baselines/reference/incompatibleExports2.errors.txt +++ b/tests/baselines/reference/incompatibleExports2.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/incompatibleExports2.ts(4,5): error TS2309: An export assignment cannot be used in a module with other exported elements. + + ==== tests/cases/compiler/incompatibleExports2.ts (1 errors) ==== declare module "foo" { export interface x { a: string } interface y { a: Date } export = y; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleGenericTypes.errors.txt b/tests/baselines/reference/incompatibleGenericTypes.errors.txt index 5dca84027d8..13aa9ea2e25 100644 --- a/tests/baselines/reference/incompatibleGenericTypes.errors.txt +++ b/tests/baselines/reference/incompatibleGenericTypes.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/incompatibleGenericTypes.ts(10,5): error TS2322: Type 'I1' is not assignable to type 'I1': + Type 'boolean' is not assignable to type 'number'. + + ==== tests/cases/compiler/incompatibleGenericTypes.ts (1 errors) ==== interface I1 { @@ -10,5 +14,5 @@ var v2: I1 = v1; ~~ -!!! Type 'I1' is not assignable to type 'I1': -!!! Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'I1' is not assignable to type 'I1': +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index bac9dbabf1f..6f7fd89d79e 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -1,3 +1,28 @@ +tests/cases/compiler/incompatibleTypes.ts(5,7): error TS2421: Class 'C1' incorrectly implements interface 'IFoo1': + Types of property 'p1' are incompatible: + Type '() => string' is not assignable to type '() => number': + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/incompatibleTypes.ts(15,7): error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': + Types of property 'p1' are incompatible: + Type '(n: number) => number' is not assignable to type '(s: string) => number': + Types of parameters 'n' and 's' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/incompatibleTypes.ts(25,7): error TS2421: Class 'C3' incorrectly implements interface 'IFoo3': + Types of property 'p1' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/incompatibleTypes.ts(33,7): error TS2421: Class 'C4' incorrectly implements interface 'IFoo4': + Types of property 'p1' are incompatible: + Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }': + Property 'a' is missing in type '{ c: { b: string; }; d: string; }'. +tests/cases/compiler/incompatibleTypes.ts(42,5): error TS2345: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. +tests/cases/compiler/incompatibleTypes.ts(49,5): error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. + Property 'c' is missing in type '{ e: number; f: number; }'. +tests/cases/compiler/incompatibleTypes.ts(66,5): error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }': + Property 'a' is missing in type '{ e: number; f: number; }'. +tests/cases/compiler/incompatibleTypes.ts(72,5): error TS2323: Type 'number' is not assignable to type '() => string'. +tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2323: Type '(a: any) => number' is not assignable to type '() => any'. + + ==== tests/cases/compiler/incompatibleTypes.ts (9 errors) ==== interface IFoo1 { p1(): number; @@ -5,10 +30,10 @@ class C1 implements IFoo1 { // incompatible on the return type ~~ -!!! Class 'C1' incorrectly implements interface 'IFoo1': -!!! Types of property 'p1' are incompatible: -!!! Type '() => string' is not assignable to type '() => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'IFoo1': +!!! error TS2421: Types of property 'p1' are incompatible: +!!! error TS2421: Type '() => string' is not assignable to type '() => number': +!!! error TS2421: Type 'string' is not assignable to type 'number'. public p1() { return "s"; } @@ -20,11 +45,11 @@ class C2 implements IFoo2 { // incompatible on the param type ~~ -!!! Class 'C2' incorrectly implements interface 'IFoo2': -!!! Types of property 'p1' are incompatible: -!!! Type '(n: number) => number' is not assignable to type '(s: string) => number': -!!! Types of parameters 'n' and 's' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': +!!! error TS2421: Types of property 'p1' are incompatible: +!!! error TS2421: Type '(n: number) => number' is not assignable to type '(s: string) => number': +!!! error TS2421: Types of parameters 'n' and 's' are incompatible: +!!! error TS2421: Type 'number' is not assignable to type 'string'. public p1(n:number) { return 0; } @@ -36,9 +61,9 @@ class C3 implements IFoo3 { // incompatible on the property type ~~ -!!! Class 'C3' incorrectly implements interface 'IFoo3': -!!! Types of property 'p1' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2421: Class 'C3' incorrectly implements interface 'IFoo3': +!!! error TS2421: Types of property 'p1' are incompatible: +!!! error TS2421: Type 'number' is not assignable to type 'string'. public p1: number; } @@ -48,10 +73,10 @@ class C4 implements IFoo4 { // incompatible on the property type ~~ -!!! Class 'C4' incorrectly implements interface 'IFoo4': -!!! Types of property 'p1' are incompatible: -!!! Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }': -!!! Property 'a' is missing in type '{ c: { b: string; }; d: string; }'. +!!! error TS2421: Class 'C4' incorrectly implements interface 'IFoo4': +!!! error TS2421: Types of property 'p1' are incompatible: +!!! error TS2421: Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }': +!!! error TS2421: Property 'a' is missing in type '{ c: { b: string; }; d: string; }'. public p1: { c: { b: string; }; d: string; }; } @@ -62,7 +87,7 @@ var c2: C2; if1(c1); ~~ -!!! Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. +!!! error TS2345: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. function of1(n: { a: { a: string; }; b: string; }): number; @@ -71,8 +96,8 @@ of1({ e: 0, f: 0 }); ~~~~~~~~~~~~~~ -!!! Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. -!!! Property 'c' is missing in type '{ e: number; f: number; }'. +!!! error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. +!!! error TS2345: Property 'c' is missing in type '{ e: number; f: number; }'. interface IMap { [key:string]:string; @@ -91,8 +116,8 @@ var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 }; ~~ -!!! Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }': -!!! Property 'a' is missing in type '{ e: number; f: number; }'. +!!! error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }': +!!! error TS2322: Property 'a' is missing in type '{ e: number; f: number; }'. var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; @@ -100,9 +125,9 @@ var i1c1: { (): string; } = 5; ~~~~ -!!! Type 'number' is not assignable to type '() => string'. +!!! error TS2323: Type 'number' is not assignable to type '() => string'. var fp1: () =>any = a => 0; ~~~ -!!! Type '(a: any) => number' is not assignable to type '() => any'. +!!! error TS2323: Type '(a: any) => number' is not assignable to type '() => any'. \ No newline at end of file diff --git a/tests/baselines/reference/incompleteDottedExpressionAtEOF.errors.txt b/tests/baselines/reference/incompleteDottedExpressionAtEOF.errors.txt index f54412d13d4..b338129db8c 100644 --- a/tests/baselines/reference/incompleteDottedExpressionAtEOF.errors.txt +++ b/tests/baselines/reference/incompleteDottedExpressionAtEOF.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/incompleteDottedExpressionAtEOF.ts(2,18): error TS1003: Identifier expected. +tests/cases/compiler/incompleteDottedExpressionAtEOF.ts(2,10): error TS2304: Cannot find name 'window'. + + ==== tests/cases/compiler/incompleteDottedExpressionAtEOF.ts (2 errors) ==== // used to leak __missing into error message var p2 = window. -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~~~~~~ -!!! Cannot find name 'window'. \ No newline at end of file +!!! error TS2304: Cannot find name 'window'. \ No newline at end of file diff --git a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt index 60bebb70367..2e363de591e 100644 --- a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt +++ b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/incompleteObjectLiteral1.ts(1,14): error TS1005: ':' expected. +tests/cases/compiler/incompleteObjectLiteral1.ts(1,16): error TS1128: Declaration or statement expected. + + ==== tests/cases/compiler/incompleteObjectLiteral1.ts (2 errors) ==== var tt = { aa; } ~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var x = tt; \ No newline at end of file diff --git a/tests/baselines/reference/incorrectClassOverloadChain.errors.txt b/tests/baselines/reference/incorrectClassOverloadChain.errors.txt index c6a4361b56e..c33ba4c9b7b 100644 --- a/tests/baselines/reference/incorrectClassOverloadChain.errors.txt +++ b/tests/baselines/reference/incorrectClassOverloadChain.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/incorrectClassOverloadChain.ts(3,5): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/incorrectClassOverloadChain.ts (1 errors) ==== class C { foo(): string; foo(x): number; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. x = 1; } \ No newline at end of file diff --git a/tests/baselines/reference/incrementAndDecrement.errors.txt b/tests/baselines/reference/incrementAndDecrement.errors.txt index b8dc8c5b4e0..f8a718c5f06 100644 --- a/tests/baselines/reference/incrementAndDecrement.errors.txt +++ b/tests/baselines/reference/incrementAndDecrement.errors.txt @@ -1,3 +1,26 @@ +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(8,5): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(11,5): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(14,5): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(17,5): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(5,9): error TS2304: Cannot find name 'window'. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(24,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(25,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(26,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(27,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(34,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(35,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(36,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(37,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(44,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(45,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(46,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(47,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(55,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(56,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(57,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + + ==== tests/cases/conformance/expressions/operators/incrementAndDecrement.ts (21 errors) ==== enum E { A, B, C }; var x = 4; @@ -5,27 +28,27 @@ var a: any; var w = window; ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. // Assign to expression++ x++ = 4; // Error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // Assign to expression-- x-- = 5; // Error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // Assign to++expression ++x = 4; // Error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // Assign to--expression --x = 5; // Error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // Pre and postfix++ on number x++; @@ -34,16 +57,16 @@ --x; ++x++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --x--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++x--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --x++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // Pre and postfix++ on enum e++; @@ -52,16 +75,16 @@ --e; ++e++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --e--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++e--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --e++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // Pre and postfix++ on value of type 'any' a++; @@ -70,16 +93,16 @@ --a; ++a++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --a--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++a--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --a++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // Pre and postfix++ on other types @@ -89,16 +112,16 @@ --w; // Error ++w++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --w--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++w--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --w++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOnTypeParameter.errors.txt b/tests/baselines/reference/incrementOnTypeParameter.errors.txt index b9461c690e2..10cfb13aee5 100644 --- a/tests/baselines/reference/incrementOnTypeParameter.errors.txt +++ b/tests/baselines/reference/incrementOnTypeParameter.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/incrementOnTypeParameter.ts(4,9): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/compiler/incrementOnTypeParameter.ts(5,39): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/incrementOnTypeParameter.ts (2 errors) ==== class C { a: T; foo() { this.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. for (var i: T, j = 0; j < 10; i++) { ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. } } } diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt index 6ebcb4490eb..ab301964026 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt @@ -1,3 +1,47 @@ +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(24,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(25,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(26,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(27,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(28,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(30,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(31,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(32,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(33,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(34,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(37,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(39,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(42,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(43,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(46,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(47,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(48,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(48,27): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(49,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(49,27): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(50,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(50,27): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(51,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(52,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(54,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(55,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(56,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(56,25): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(57,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(57,25): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(58,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(58,25): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(59,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(60,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(63,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(65,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + + ==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts (42 errors) ==== // ++ operator on any type var ANY1; @@ -24,131 +68,131 @@ // any type var var ResultIsNumber1 = ++ANY2; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = ++A; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = ++M; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = ++obj; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = ++obj1; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = ANY2++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = A++; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = M++; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber9 = obj++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = obj1++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // any type literal var ResultIsNumber11 = ++{}; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = ++null; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = ++undefined; ~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = null++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = {}++; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = undefined++; ~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // any type expressions var ResultIsNumber17 = ++foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber18 = ++A.foo(); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber19 = ++(null + undefined); ~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber20 = ++(null + null); ~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber21 = ++(undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber22 = ++obj1.x; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber23 = ++obj1.y; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber24 = foo()++; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber25 = A.foo()++; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber26 = (null + undefined)++; ~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber27 = (null + null)++; ~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber28 = (undefined + undefined)++; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber29 = obj1.x++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber30 = obj1.y++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators ++ANY2; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ANY2++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++ANY1++; ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++ANY2++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++ANY2[0]++; ~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithEnumTypeInvalidOperations.errors.txt b/tests/baselines/reference/incrementOperatorWithEnumTypeInvalidOperations.errors.txt index f2262423810..81b091264bb 100644 --- a/tests/baselines/reference/incrementOperatorWithEnumTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithEnumTypeInvalidOperations.errors.txt @@ -1,3 +1,15 @@ +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(7,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(8,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(10,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(11,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(14,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(15,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(18,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(19,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(21,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(22,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts (10 errors) ==== // ++ operator on enum type @@ -7,37 +19,37 @@ // enum type var var ResultIsNumber1 = ++ENUM; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = ++ENUM1; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = ENUM++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = ENUM1++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // enum type expressions var ResultIsNumber5 = ++(ENUM[1] + ENUM[2]); ~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = (ENUM[1] + ENUM[2])++; ~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operator ++ENUM; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++ENUM1; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ENUM++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ENUM1++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.errors.txt b/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.errors.txt index be0ea1d1492..71c3ad67c46 100644 --- a/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.errors.txt @@ -1,3 +1,25 @@ +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(18,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(19,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(22,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(23,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(24,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(26,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(27,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(28,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(31,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(32,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(33,26): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(35,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(36,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(37,24): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(40,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(41,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(42,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(44,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(45,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts(46,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + + ==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts (20 errors) ==== // ++ operator on number type var NUMBER: number; @@ -18,70 +40,70 @@ //number type var var ResultIsNumber1 = ++NUMBER1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = NUMBER1++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // number type literal var ResultIsNumber3 = ++1; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber4 = ++{ x: 1, y: 2}; ~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = ++{ x: 1, y: (n: number) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = 1++; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber7 = { x: 1, y: 2 }++; ~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = { x: 1, y: (n: number) => { return n; } }++; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // number type expressions var ResultIsNumber9 = ++foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber10 = ++A.foo(); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber11 = ++(NUMBER + NUMBER); ~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber12 = foo()++; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber13 = A.foo()++; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber14 = (NUMBER + NUMBER)++; ~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // miss assignment operator ++1; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++NUMBER1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. 1++; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. NUMBER1++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()++; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.errors.txt b/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.errors.txt index ff51aac9af0..42c00a2bf28 100644 --- a/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.errors.txt @@ -1,3 +1,34 @@ +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(17,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(19,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(22,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(23,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(24,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(26,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(27,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(28,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(31,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(32,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(33,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(34,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(36,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(37,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(38,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(39,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(42,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(43,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(44,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(45,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(46,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(47,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(49,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(50,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(51,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(52,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(53,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(54,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts(54,11): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts (29 errors) ==== // ++ operator on boolean type var BOOLEAN: boolean; @@ -17,97 +48,97 @@ // boolean type var var ResultIsNumber1 = ++BOOLEAN; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = BOOLEAN++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // boolean type literal var ResultIsNumber3 = ++true; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = ++{ x: true, y: false }; ~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = ++{ x: true, y: (n: boolean) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = true++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = { x: true, y: false }++; ~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = { x: true, y: (n: boolean) => { return n; } }++; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // boolean type expressions var ResultIsNumber9 = ++objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = ++M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber11 = ++foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = ++A.foo(); ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = foo()++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = A.foo()++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = objA.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = M.n++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators ++true; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++BOOLEAN; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++objA.a, M.n; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. true++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. BOOLEAN++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. M.n++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a++, M.n++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.errors.txt b/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.errors.txt index 3449108faa4..7947bcb34b8 100644 --- a/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.errors.txt @@ -1,3 +1,44 @@ +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(18,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(19,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(21,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(22,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(25,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(26,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(27,25): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(29,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(30,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(31,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(34,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(35,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(36,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(37,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(38,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(39,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(41,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(42,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(43,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(44,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(45,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(46,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(49,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(50,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(51,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(52,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(53,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(54,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(55,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(56,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(58,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(59,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(60,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(61,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(62,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(63,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(64,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(65,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts(65,11): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts (39 errors) ==== // ++ operator on string type var STRING: string; @@ -18,127 +59,127 @@ // string type var var ResultIsNumber1 = ++STRING; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = ++STRING1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = STRING++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = STRING1++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // string type literal var ResultIsNumber5 = ++""; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = ++{ x: "", y: "" }; ~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = ++{ x: "", y: (s: string) => { return s; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = ""++; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber9 = { x: "", y: "" }++; ~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = { x: "", y: (s: string) => { return s; } }++; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // string type expressions var ResultIsNumber11 = ++objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = ++M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = ++STRING1[0]; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = ++foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = ++A.foo(); ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = ++(STRING + STRING); ~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber17 = objA.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber18 = M.n++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber19 = STRING1[0]++; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber20 = foo()++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber21 = A.foo()++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber22 = (STRING + STRING)++; ~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators ++""; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++STRING; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++STRING1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++STRING1[0]; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++objA.a, M.n; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ""++; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING1++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING1[0]++; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. M.n++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a++, M.n++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/indexIntoArraySubclass.errors.txt b/tests/baselines/reference/indexIntoArraySubclass.errors.txt index 83919640f7a..297ef6a960b 100644 --- a/tests/baselines/reference/indexIntoArraySubclass.errors.txt +++ b/tests/baselines/reference/indexIntoArraySubclass.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/indexIntoArraySubclass.ts(4,1): error TS2323: Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/indexIntoArraySubclass.ts (1 errors) ==== interface Foo2 extends Array { } var x2: Foo2; var r = x2[0]; // string r = 0; //error ~ -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt b/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt index d0aec71ef15..52934b7ae9e 100644 --- a/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt +++ b/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt @@ -1,22 +1,28 @@ +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(2,6): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(7,6): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(12,5): error TS1021: An index signature must have a type annotation. + + ==== tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts (4 errors) ==== interface I { [x]: string; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [x: string]; ~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. } class C { [x]: string ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. } class C2 { [x: string] ~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureTypeCheck.errors.txt b/tests/baselines/reference/indexSignatureTypeCheck.errors.txt index 0c808feecbf..1cc69f6294b 100644 --- a/tests/baselines/reference/indexSignatureTypeCheck.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeCheck.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/indexSignatureTypeCheck.ts(14,6): error TS1019: An index signature parameter cannot have a question mark. +tests/cases/compiler/indexSignatureTypeCheck.ts(15,9): error TS1017: An index signature cannot have a rest parameter. +tests/cases/compiler/indexSignatureTypeCheck.ts(16,6): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/indexSignatureTypeCheck.ts(17,6): error TS1096: An index signature must have exactly one parameter. + + ==== tests/cases/compiler/indexSignatureTypeCheck.ts (4 errors) ==== interface IPropertySet { @@ -14,14 +20,14 @@ interface indexErrors { [p2?: string]; ~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. [...p3: any[]]; ~~ -!!! An index signature cannot have a rest parameter. +!!! error TS1017: An index signature cannot have a rest parameter. [p4: string, p5?: string]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. [p6: string, ...p7: any[]]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureTypeCheck2.errors.txt b/tests/baselines/reference/indexSignatureTypeCheck2.errors.txt index 88a004e0b37..25e3ab94280 100644 --- a/tests/baselines/reference/indexSignatureTypeCheck2.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeCheck2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/indexSignatureTypeCheck2.ts(10,6): error TS1019: An index signature parameter cannot have a question mark. +tests/cases/compiler/indexSignatureTypeCheck2.ts(11,9): error TS1017: An index signature cannot have a rest parameter. +tests/cases/compiler/indexSignatureTypeCheck2.ts(12,6): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/indexSignatureTypeCheck2.ts(13,6): error TS1096: An index signature must have exactly one parameter. + + ==== tests/cases/compiler/indexSignatureTypeCheck2.ts (4 errors) ==== class IPropertySet { [index: string]: any @@ -10,14 +16,14 @@ interface indexErrors { [p2?: string]; ~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. [...p3: any[]]; ~~ -!!! An index signature cannot have a rest parameter. +!!! error TS1017: An index signature cannot have a rest parameter. [p4: string, p5?: string]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. [p6: string, ...p7: any[]]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureTypeInference.errors.txt b/tests/baselines/reference/indexSignatureTypeInference.errors.txt index ee42069a4ec..55bd2ce884f 100644 --- a/tests/baselines/reference/indexSignatureTypeInference.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeInference.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts(18,27): error TS2345: Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap<{}>'. + + ==== tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts (1 errors) ==== interface NumberMap { [index: number]: T; @@ -18,6 +21,6 @@ var v1 = numberMapToArray(stringMap); // Ok var v1 = stringMapToArray(numberMap); // Error expected here ~~~~~~~~~ -!!! Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap<{}>'. +!!! error TS2345: Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap<{}>'. var v1 = stringMapToArray(stringMap); // Ok \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureWithAccessibilityModifier.errors.txt b/tests/baselines/reference/indexSignatureWithAccessibilityModifier.errors.txt index 0b857a8df05..6c836e268d6 100644 --- a/tests/baselines/reference/indexSignatureWithAccessibilityModifier.errors.txt +++ b/tests/baselines/reference/indexSignatureWithAccessibilityModifier.errors.txt @@ -1,16 +1,22 @@ +tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts(2,13): error TS1018: An index signature parameter cannot have an accessibility modifier. +tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts(6,13): error TS1018: An index signature parameter cannot have an accessibility modifier. +tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts(2,6): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts(6,6): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts (4 errors) ==== interface I { [public x: string]: string; ~ -!!! An index signature parameter cannot have an accessibility modifier. +!!! error TS1018: An index signature parameter cannot have an accessibility modifier. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } class C { [public x: string]: string ~ -!!! An index signature parameter cannot have an accessibility modifier. +!!! error TS1018: An index signature parameter cannot have an accessibility modifier. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureWithInitializer.errors.txt b/tests/baselines/reference/indexSignatureWithInitializer.errors.txt index c82a2103e66..9eeff2c5781 100644 --- a/tests/baselines/reference/indexSignatureWithInitializer.errors.txt +++ b/tests/baselines/reference/indexSignatureWithInitializer.errors.txt @@ -1,16 +1,22 @@ +tests/cases/compiler/indexSignatureWithInitializer.ts(2,6): error TS1020: An index signature parameter cannot have an initializer. +tests/cases/compiler/indexSignatureWithInitializer.ts(6,6): error TS1020: An index signature parameter cannot have an initializer. +tests/cases/compiler/indexSignatureWithInitializer.ts(2,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/compiler/indexSignatureWithInitializer.ts(6,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + ==== tests/cases/compiler/indexSignatureWithInitializer.ts (4 errors) ==== interface I { [x = '']: string; ~ -!!! An index signature parameter cannot have an initializer. +!!! error TS1020: An index signature parameter cannot have an initializer. ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } class C { [x = 0]: string ~ -!!! An index signature parameter cannot have an initializer. +!!! error TS1020: An index signature parameter cannot have an initializer. ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/indexTypeCheck.errors.txt b/tests/baselines/reference/indexTypeCheck.errors.txt index d5a9fab9d62..71bc03eca96 100644 --- a/tests/baselines/reference/indexTypeCheck.errors.txt +++ b/tests/baselines/reference/indexTypeCheck.errors.txt @@ -1,11 +1,21 @@ +tests/cases/compiler/indexTypeCheck.ts(2,2): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/indexTypeCheck.ts(3,2): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/indexTypeCheck.ts(32,3): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/indexTypeCheck.ts(36,3): error TS1023: An index signature parameter type must be 'string' or 'number'. +tests/cases/compiler/indexTypeCheck.ts(17,2): error TS2413: Numeric index type 'number' is not assignable to string index type 'string'. +tests/cases/compiler/indexTypeCheck.ts(22,2): error TS2413: Numeric index type 'Orange' is not assignable to string index type 'Yellow'. +tests/cases/compiler/indexTypeCheck.ts(27,2): error TS2413: Numeric index type 'number' is not assignable to string index type 'string'. +tests/cases/compiler/indexTypeCheck.ts(51,1): error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. + + ==== tests/cases/compiler/indexTypeCheck.ts (8 errors) ==== interface Red { [n:number]; // ok ~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [s:string]; // ok ~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. } interface Blue { @@ -21,34 +31,34 @@ interface Orange { [n:number]: number; // ok ~~~~~~~~~~~~~~~~~~~ -!!! Numeric index type 'number' is not assignable to string index type 'string'. +!!! error TS2413: Numeric index type 'number' is not assignable to string index type 'string'. [s:string]: string; // error } interface Green { [n:number]: Orange; // error ~~~~~~~~~~~~~~~~~~~ -!!! Numeric index type 'Orange' is not assignable to string index type 'Yellow'. +!!! error TS2413: Numeric index type 'Orange' is not assignable to string index type 'Yellow'. [s:string]: Yellow; // ok } interface Cyan { [n:number]: number; // error ~~~~~~~~~~~~~~~~~~~ -!!! Numeric index type 'number' is not assignable to string index type 'string'. +!!! error TS2413: Numeric index type 'number' is not assignable to string index type 'string'. [s:string]: string; // ok } interface Purple { [n:number, s:string]; // error ~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. } interface Magenta { [p:Purple]; // error ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. } var yellow: Yellow; @@ -65,7 +75,7 @@ yellow[blue]; // error ~~~~~~~~~~~~ -!!! An index expression argument must be of type 'string', 'number', or 'any'. +!!! error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. var x:number[]; x[0]; diff --git a/tests/baselines/reference/indexWithoutParamType.errors.txt b/tests/baselines/reference/indexWithoutParamType.errors.txt index 0fc4f4c094f..292583302a0 100644 --- a/tests/baselines/reference/indexWithoutParamType.errors.txt +++ b/tests/baselines/reference/indexWithoutParamType.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/indexWithoutParamType.ts(1,10): error TS1096: An index signature must have exactly one parameter. + + ==== tests/cases/compiler/indexWithoutParamType.ts (1 errors) ==== var y: { []; } // Error ~~ -!!! An index signature must have exactly one parameter. \ No newline at end of file +!!! error TS1096: An index signature must have exactly one parameter. \ No newline at end of file diff --git a/tests/baselines/reference/indexWithoutParamType2.errors.txt b/tests/baselines/reference/indexWithoutParamType2.errors.txt index 50cdb50379e..3e7b9b49223 100644 --- a/tests/baselines/reference/indexWithoutParamType2.errors.txt +++ b/tests/baselines/reference/indexWithoutParamType2.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/indexWithoutParamType2.ts(2,6): error TS1022: An index signature parameter must have a type annotation. + + ==== tests/cases/compiler/indexWithoutParamType2.ts (1 errors) ==== class C { [x]: string ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/indexer2A.errors.txt b/tests/baselines/reference/indexer2A.errors.txt index 59575b3ef5b..adf90fb743f 100644 --- a/tests/baselines/reference/indexer2A.errors.txt +++ b/tests/baselines/reference/indexer2A.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/indexer2A.ts(4,5): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/compiler/indexer2A.ts (1 errors) ==== class IHeapObjectProperty { } class IDirectChildrenMap { // Decided to enforce a semicolon after declarations hasOwnProperty(objectId: number): boolean ~~~~~~~~~~~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. [objectId: number]: IHeapObjectProperty[] } var directChildrenMap = {}; \ No newline at end of file diff --git a/tests/baselines/reference/indexerAsOptional.errors.txt b/tests/baselines/reference/indexerAsOptional.errors.txt index c76a4791936..101c03acccd 100644 --- a/tests/baselines/reference/indexerAsOptional.errors.txt +++ b/tests/baselines/reference/indexerAsOptional.errors.txt @@ -1,14 +1,18 @@ +tests/cases/compiler/indexerAsOptional.ts(3,6): error TS1019: An index signature parameter cannot have a question mark. +tests/cases/compiler/indexerAsOptional.ts(8,6): error TS1019: An index signature parameter cannot have a question mark. + + ==== tests/cases/compiler/indexerAsOptional.ts (2 errors) ==== interface indexSig { //Index signatures can't be optional [idx?: number]: any; //err ~~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. } class indexSig2 { //Index signatures can't be optional [idx?: number]: any //err ~~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. } \ No newline at end of file diff --git a/tests/baselines/reference/indexerAssignability.errors.txt b/tests/baselines/reference/indexerAssignability.errors.txt index b7dca06f207..062ddbc3c43 100644 --- a/tests/baselines/reference/indexerAssignability.errors.txt +++ b/tests/baselines/reference/indexerAssignability.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/indexerAssignability.ts(5,1): error TS2322: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }': + Index signature is missing in type '{ [x: number]: string; }'. +tests/cases/compiler/indexerAssignability.ts(6,1): error TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }': + Index signature is missing in type '{}'. +tests/cases/compiler/indexerAssignability.ts(8,1): error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }': + Index signature is missing in type '{}'. + + ==== tests/cases/compiler/indexerAssignability.ts (3 errors) ==== var a: { [s: string]: string; }; var b: { [n: number]: string; }; @@ -5,16 +13,16 @@ a = b; ~ -!!! Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }': -!!! Index signature is missing in type '{ [x: number]: string; }'. +!!! error TS2322: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }': +!!! error TS2322: Index signature is missing in type '{ [x: number]: string; }'. a = c; ~ -!!! Type '{}' is not assignable to type '{ [x: string]: string; }': -!!! Index signature is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }': +!!! error TS2322: Index signature is missing in type '{}'. b = a; b = c; ~ -!!! Type '{}' is not assignable to type '{ [x: number]: string; }': -!!! Index signature is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }': +!!! error TS2322: Index signature is missing in type '{}'. c = a; c = b; \ No newline at end of file diff --git a/tests/baselines/reference/indexerConstraints.errors.txt b/tests/baselines/reference/indexerConstraints.errors.txt index ff0a75e0b7f..cb7785535d1 100644 --- a/tests/baselines/reference/indexerConstraints.errors.txt +++ b/tests/baselines/reference/indexerConstraints.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/indexerConstraints.ts(17,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. +tests/cases/compiler/indexerConstraints.ts(25,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. +tests/cases/compiler/indexerConstraints.ts(33,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. +tests/cases/compiler/indexerConstraints.ts(41,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. + + ==== tests/cases/compiler/indexerConstraints.ts (4 errors) ==== interface A { a: number; } interface B extends A { b: number; } @@ -17,7 +23,7 @@ interface E { [n: number]: A; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // Inheritance @@ -27,7 +33,7 @@ interface G extends F { [n: number]: A; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // Other way @@ -37,7 +43,7 @@ interface I extends H { [s: string]: B; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // With hidden indexer @@ -47,6 +53,6 @@ interface K extends J { [n: number]: A; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. [s: string]: B; } \ No newline at end of file diff --git a/tests/baselines/reference/indexerConstraints2.errors.txt b/tests/baselines/reference/indexerConstraints2.errors.txt index 39f16a1b200..316486e709f 100644 --- a/tests/baselines/reference/indexerConstraints2.errors.txt +++ b/tests/baselines/reference/indexerConstraints2.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/indexerConstraints2.ts(9,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. +tests/cases/compiler/indexerConstraints2.ts(17,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. +tests/cases/compiler/indexerConstraints2.ts(26,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. + + ==== tests/cases/compiler/indexerConstraints2.ts (3 errors) ==== class A { a: number; } class B extends A { b: number; } @@ -9,7 +14,7 @@ class G extends F { [n: number]: A ~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // Other way @@ -19,7 +24,7 @@ class I extends H { [s: string]: B ~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // With hidden indexer @@ -30,6 +35,6 @@ class K extends J { [n: number]: A; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. [s: string]: B; } \ No newline at end of file diff --git a/tests/baselines/reference/indexerSignatureWithRestParam.errors.txt b/tests/baselines/reference/indexerSignatureWithRestParam.errors.txt index d97a4d2a19d..4743ed8e91c 100644 --- a/tests/baselines/reference/indexerSignatureWithRestParam.errors.txt +++ b/tests/baselines/reference/indexerSignatureWithRestParam.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/indexerSignatureWithRestParam.ts(2,9): error TS1017: An index signature cannot have a rest parameter. +tests/cases/compiler/indexerSignatureWithRestParam.ts(6,9): error TS1017: An index signature cannot have a rest parameter. + + ==== tests/cases/compiler/indexerSignatureWithRestParam.ts (2 errors) ==== interface I { [...x]: string; ~ -!!! An index signature cannot have a rest parameter. +!!! error TS1017: An index signature cannot have a rest parameter. } class C { [...x]: string ~ -!!! An index signature cannot have a rest parameter. +!!! error TS1017: An index signature cannot have a rest parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/indirectSelfReference.errors.txt b/tests/baselines/reference/indirectSelfReference.errors.txt index 209d85233ac..e7c5a00d421 100644 --- a/tests/baselines/reference/indirectSelfReference.errors.txt +++ b/tests/baselines/reference/indirectSelfReference.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/indirectSelfReference.ts(1,7): error TS2310: Type 'a' recursively references itself as a base type. + + ==== tests/cases/compiler/indirectSelfReference.ts (1 errors) ==== class a extends b{ } ~ -!!! Type 'a' recursively references itself as a base type. +!!! error TS2310: Type 'a' recursively references itself as a base type. class b extends a{ } \ No newline at end of file diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.errors.txt b/tests/baselines/reference/indirectSelfReferenceGeneric.errors.txt index 6ce51ab9752..765112f0e99 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.errors.txt +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/indirectSelfReferenceGeneric.ts(1,7): error TS2310: Type 'a' recursively references itself as a base type. + + ==== tests/cases/compiler/indirectSelfReferenceGeneric.ts (1 errors) ==== class a extends b { } ~ -!!! Type 'a' recursively references itself as a base type. +!!! error TS2310: Type 'a' recursively references itself as a base type. class b extends a { } \ No newline at end of file diff --git a/tests/baselines/reference/inferSetterParamType.errors.txt b/tests/baselines/reference/inferSetterParamType.errors.txt index 5c8a590e620..9b01d9c4bc6 100644 --- a/tests/baselines/reference/inferSetterParamType.errors.txt +++ b/tests/baselines/reference/inferSetterParamType.errors.txt @@ -1,14 +1,21 @@ +tests/cases/compiler/inferSetterParamType.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inferSetterParamType.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inferSetterParamType.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inferSetterParamType.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inferSetterParamType.ts(13,16): error TS2323: Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/inferSetterParamType.ts (5 errors) ==== class Foo { get bar() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; } set bar(n) { // should not be an error - infer number ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } @@ -16,14 +23,14 @@ get bar() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; // should be an error - can't coerce infered return type to match setter annotated type ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. } set bar(n:string) { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt index 8644e8b3e0b..0c87fb6d22d 100644 --- a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt +++ b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts(4,1): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts(5,1): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts (2 errors) ==== function f(x: T, y: T): T { return x; } f({ x: [null] }, { x: [1] }).x[0] = "" // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. f({ x: [1] }, { x: [null] }).x[0] = "" // was error TS2011: Cannot convert 'string' to 'number'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt b/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt index d1afdb17f44..915e75dd6da 100644 --- a/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt +++ b/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts(1,1): error TS2354: No best common type exists among return expressions. + + ==== tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts (1 errors) ==== function foo() { ~~~~~~~~~~~~~~~~ @@ -15,5 +18,5 @@ ~~~~~ }; ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. \ No newline at end of file diff --git a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt index 577913c10e9..908681ddf7a 100644 --- a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt +++ b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts(16,1): error TS2322: Type 'OwnerList' is not assignable to type 'List': + Types of property 'data' are incompatible: + Type 'List' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts(21,5): error TS2322: Type 'OwnerList' is not assignable to type 'List': + Types of property 'data' are incompatible: + Type 'List' is not assignable to type 'T'. + + ==== tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts (2 errors) ==== // instantiating a derived type can cause an infinitely expanding type reference to be generated @@ -16,18 +24,18 @@ var ownerList: OwnerList; list = ownerList; ~~~~ -!!! Type 'OwnerList' is not assignable to type 'List': -!!! Types of property 'data' are incompatible: -!!! Type 'List' is not assignable to type 'string'. +!!! error TS2322: Type 'OwnerList' is not assignable to type 'List': +!!! error TS2322: Types of property 'data' are incompatible: +!!! error TS2322: Type 'List' is not assignable to type 'string'. function other(x: T) { var list: List; var ownerList: OwnerList; list = ownerList; ~~~~ -!!! Type 'OwnerList' is not assignable to type 'List': -!!! Types of property 'data' are incompatible: -!!! Type 'List' is not assignable to type 'T'. +!!! error TS2322: Type 'OwnerList' is not assignable to type 'List': +!!! error TS2322: Types of property 'data' are incompatible: +!!! error TS2322: Type 'List' is not assignable to type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/infiniteExpansionThroughInstantiation2.errors.txt b/tests/baselines/reference/infiniteExpansionThroughInstantiation2.errors.txt index 958adf5d312..1778e092715 100644 --- a/tests/baselines/reference/infiniteExpansionThroughInstantiation2.errors.txt +++ b/tests/baselines/reference/infiniteExpansionThroughInstantiation2.errors.txt @@ -1,10 +1,13 @@ +tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation2.ts(4,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation2.ts (1 errors) ==== // instantiating a derived type can cause an infinitely expanding type reference to be generated // which could be used in an assignment check for constraint satisfaction interface AA> // now an error due to referencing type parameter in constraint ~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. { x: T } diff --git a/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt b/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt index fb3893d9c2a..fc3c49477fb 100644 --- a/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt +++ b/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/infinitelyExpandingOverloads.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/infinitelyExpandingOverloads.ts (1 errors) ==== interface KnockoutSubscription2 { target: KnockoutObservableBase2; @@ -23,7 +26,7 @@ } public get options(): ViewModel { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } } \ No newline at end of file diff --git a/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt b/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt index 969036a6355..e188c8da45f 100644 --- a/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt +++ b/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/infinitelyExpandingTypes1.ts(21,1): error TS2365: Operator '==' cannot be applied to types 'List' and 'List'. + + ==== tests/cases/compiler/infinitelyExpandingTypes1.ts (1 errors) ==== interface List { data: T; @@ -21,6 +24,6 @@ l == l2; // should error; ~~~~~~~ -!!! Operator '==' cannot be applied to types 'List' and 'List'. +!!! error TS2365: Operator '==' cannot be applied to types 'List' and 'List'. l == l; // should not error \ No newline at end of file diff --git a/tests/baselines/reference/infinitelyExpandingTypes2.errors.txt b/tests/baselines/reference/infinitelyExpandingTypes2.errors.txt index c9e46e20b97..3f79b63ca1e 100644 --- a/tests/baselines/reference/infinitelyExpandingTypes2.errors.txt +++ b/tests/baselines/reference/infinitelyExpandingTypes2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/infinitelyExpandingTypes2.ts(10,5): error TS2304: Cannot find name 'console'. + + ==== tests/cases/compiler/infinitelyExpandingTypes2.ts (1 errors) ==== interface Foo { x: Foo>; @@ -10,7 +13,7 @@ function f(p: Foo) { console.log(p); ~~~~~~~ -!!! Cannot find name 'console'. +!!! error TS2304: Cannot find name 'console'. } var v: Bar = null; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt b/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt index f2946439380..a9b3cb4b686 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/inheritFromGenericTypeParameter.ts(1,20): error TS2311: A class may only extend another class. +tests/cases/compiler/inheritFromGenericTypeParameter.ts(2,24): error TS2312: An interface may only extend a class or another interface. + + ==== tests/cases/compiler/inheritFromGenericTypeParameter.ts (2 errors) ==== class C extends T { } ~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. interface I extends T { } ~ -!!! An interface may only extend a class or another interface. \ No newline at end of file +!!! error TS2312: An interface may only extend a class or another interface. \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt index c4093032cf8..71a9f74e77a 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': + Named properties 'x' of types 'C' and 'C2' are not identical. + + ==== tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts (1 errors) ==== class C { private x: number; @@ -9,7 +13,7 @@ interface A extends C, C2 { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt index 3dc0aa2b25b..8de311e230a 100644 --- a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt +++ b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': + Named properties 'x' of types 'C' and 'C2' are not identical. + + ==== tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts (1 errors) ==== interface C { x?: number; @@ -9,7 +13,7 @@ interface A extends C, C2 { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt index e8d89b75c09..a6671492277 100644 --- a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt +++ b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritSameNamePropertiesWithDifferentVisibility.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': + Named properties 'x' of types 'C' and 'C2' are not identical. + + ==== tests/cases/compiler/inheritSameNamePropertiesWithDifferentVisibility.ts (1 errors) ==== class C { public x: number; @@ -9,7 +13,7 @@ interface A extends C, C2 { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritance.errors.txt b/tests/baselines/reference/inheritance.errors.txt index dfe00fc6240..4811357b6d5 100644 --- a/tests/baselines/reference/inheritance.errors.txt +++ b/tests/baselines/reference/inheritance.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/inheritance.ts(30,7): error TS2416: Class 'Baad' incorrectly extends base class 'Good': + Types of property 'g' are incompatible: + Type '(n: number) => number' is not assignable to type '() => number'. +tests/cases/compiler/inheritance.ts(31,12): error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. + + ==== tests/cases/compiler/inheritance.ts (2 errors) ==== class B1 { public x; @@ -30,12 +36,12 @@ class Baad extends Good { ~~~~ -!!! Class 'Baad' incorrectly extends base class 'Good': -!!! Types of property 'g' are incompatible: -!!! Type '(n: number) => number' is not assignable to type '() => number'. +!!! error TS2416: Class 'Baad' incorrectly extends base class 'Good': +!!! error TS2416: Types of property 'g' are incompatible: +!!! error TS2416: Type '(n: number) => number' is not assignable to type '() => number'. public f(): number { return 0; } ~ -!!! Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. +!!! error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. public g(n: number) { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritance1.errors.txt b/tests/baselines/reference/inheritance1.errors.txt index 537b7b8fa4e..0d2f6a72bfd 100644 --- a/tests/baselines/reference/inheritance1.errors.txt +++ b/tests/baselines/reference/inheritance1.errors.txt @@ -1,3 +1,27 @@ +tests/cases/compiler/inheritance1.ts(14,7): error TS2421: Class 'ImageBase' incorrectly implements interface 'SelectableControl': + Property 'select' is missing in type 'ImageBase'. +tests/cases/compiler/inheritance1.ts(18,7): error TS2421: Class 'Locations' incorrectly implements interface 'SelectableControl': + Property 'state' is missing in type 'Locations'. +tests/cases/compiler/inheritance1.ts(31,1): error TS2322: Type 'Control' is not assignable to type 'Button': + Property 'select' is missing in type 'Control'. +tests/cases/compiler/inheritance1.ts(37,1): error TS2322: Type 'Control' is not assignable to type 'TextBox': + Property 'select' is missing in type 'Control'. +tests/cases/compiler/inheritance1.ts(40,1): error TS2323: Type 'ImageBase' is not assignable to type 'SelectableControl'. +tests/cases/compiler/inheritance1.ts(46,1): error TS2322: Type 'Image1' is not assignable to type 'SelectableControl': + Property 'select' is missing in type 'Image1'. +tests/cases/compiler/inheritance1.ts(52,1): error TS2323: Type 'Locations' is not assignable to type 'SelectableControl'. +tests/cases/compiler/inheritance1.ts(53,1): error TS2322: Type 'Locations' is not assignable to type 'Control': + Property 'state' is missing in type 'Locations'. +tests/cases/compiler/inheritance1.ts(55,1): error TS2322: Type 'Control' is not assignable to type 'Locations': + Property 'select' is missing in type 'Control'. +tests/cases/compiler/inheritance1.ts(58,1): error TS2322: Type 'Locations1' is not assignable to type 'SelectableControl': + Property 'state' is missing in type 'Locations1'. +tests/cases/compiler/inheritance1.ts(59,1): error TS2322: Type 'Locations1' is not assignable to type 'Control': + Property 'state' is missing in type 'Locations1'. +tests/cases/compiler/inheritance1.ts(61,1): error TS2322: Type 'Control' is not assignable to type 'Locations1': + Property 'select' is missing in type 'Control'. + + ==== tests/cases/compiler/inheritance1.ts (12 errors) ==== class Control { private state: any; @@ -14,15 +38,15 @@ } class ImageBase extends Control implements SelectableControl{ ~~~~~~~~~ -!!! Class 'ImageBase' incorrectly implements interface 'SelectableControl': -!!! Property 'select' is missing in type 'ImageBase'. +!!! error TS2421: Class 'ImageBase' incorrectly implements interface 'SelectableControl': +!!! error TS2421: Property 'select' is missing in type 'ImageBase'. } class Image1 extends Control { } class Locations implements SelectableControl { ~~~~~~~~~ -!!! Class 'Locations' incorrectly implements interface 'SelectableControl': -!!! Property 'state' is missing in type 'Locations'. +!!! error TS2421: Class 'Locations' incorrectly implements interface 'SelectableControl': +!!! error TS2421: Property 'state' is missing in type 'Locations'. select() { } } class Locations1 { @@ -37,8 +61,8 @@ b = sc; b = c; ~ -!!! Type 'Control' is not assignable to type 'Button': -!!! Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'Button': +!!! error TS2322: Property 'select' is missing in type 'Control'. var t: TextBox; sc = t; @@ -46,13 +70,13 @@ t = sc; t = c; ~ -!!! Type 'Control' is not assignable to type 'TextBox': -!!! Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'TextBox': +!!! error TS2322: Property 'select' is missing in type 'Control'. var i: ImageBase; sc = i; ~~ -!!! Type 'ImageBase' is not assignable to type 'SelectableControl'. +!!! error TS2323: Type 'ImageBase' is not assignable to type 'SelectableControl'. c = i; i = sc; i = c; @@ -60,8 +84,8 @@ var i1: Image1; sc = i1; ~~ -!!! Type 'Image1' is not assignable to type 'SelectableControl': -!!! Property 'select' is missing in type 'Image1'. +!!! error TS2322: Type 'Image1' is not assignable to type 'SelectableControl': +!!! error TS2322: Property 'select' is missing in type 'Image1'. c = i1; i1 = sc; i1 = c; @@ -69,28 +93,28 @@ var l: Locations; sc = l; ~~ -!!! Type 'Locations' is not assignable to type 'SelectableControl'. +!!! error TS2323: Type 'Locations' is not assignable to type 'SelectableControl'. c = l; ~ -!!! Type 'Locations' is not assignable to type 'Control': -!!! Property 'state' is missing in type 'Locations'. +!!! error TS2322: Type 'Locations' is not assignable to type 'Control': +!!! error TS2322: Property 'state' is missing in type 'Locations'. l = sc; l = c; ~ -!!! Type 'Control' is not assignable to type 'Locations': -!!! Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'Locations': +!!! error TS2322: Property 'select' is missing in type 'Control'. var l1: Locations1; sc = l1; ~~ -!!! Type 'Locations1' is not assignable to type 'SelectableControl': -!!! Property 'state' is missing in type 'Locations1'. +!!! error TS2322: Type 'Locations1' is not assignable to type 'SelectableControl': +!!! error TS2322: Property 'state' is missing in type 'Locations1'. c = l1; ~ -!!! Type 'Locations1' is not assignable to type 'Control': -!!! Property 'state' is missing in type 'Locations1'. +!!! error TS2322: Type 'Locations1' is not assignable to type 'Control': +!!! error TS2322: Property 'state' is missing in type 'Locations1'. l1 = sc; l1 = c; ~~ -!!! Type 'Control' is not assignable to type 'Locations1': -!!! Property 'select' is missing in type 'Control'. \ No newline at end of file +!!! error TS2322: Type 'Control' is not assignable to type 'Locations1': +!!! error TS2322: Property 'select' is missing in type 'Control'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt index a59e3da0d04..ae9c62b0f1e 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts(7,7): error TS2416: Class 'C' incorrectly extends base class 'B': + Private property 'myMethod' cannot be reimplemented. + + ==== tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts (1 errors) ==== class A { private myMethod() { } @@ -7,8 +11,8 @@ class C extends B { ~ -!!! Class 'C' incorrectly extends base class 'B': -!!! Private property 'myMethod' cannot be reimplemented. +!!! error TS2416: Class 'C' incorrectly extends base class 'B': +!!! error TS2416: Private property 'myMethod' cannot be reimplemented. private myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt index ca7a3b32b8e..532214638d9 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts(7,7): error TS2416: Class 'C' incorrectly extends base class 'B': + Private property 'myMethod' cannot be reimplemented. + + ==== tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts (1 errors) ==== class A { private myMethod() { } @@ -7,8 +11,8 @@ class C extends B { ~ -!!! Class 'C' incorrectly extends base class 'B': -!!! Private property 'myMethod' cannot be reimplemented. +!!! error TS2416: Class 'C' incorrectly extends base class 'B': +!!! error TS2416: Private property 'myMethod' cannot be reimplemented. public myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt index be63f2e9c1e..06508ede868 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts(7,7): error TS2416: Class 'C' incorrectly extends base class 'B': + Private property 'myMethod' cannot be reimplemented. + + ==== tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts (1 errors) ==== class A { public myMethod() { } @@ -7,8 +11,8 @@ class C extends B { ~ -!!! Class 'C' incorrectly extends base class 'B': -!!! Private property 'myMethod' cannot be reimplemented. +!!! error TS2416: Class 'C' incorrectly extends base class 'B': +!!! error TS2416: Private property 'myMethod' cannot be reimplemented. private myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt index b62b70743ca..f729e230ca2 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt @@ -1,13 +1,19 @@ +tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts(14,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts (4 errors) ==== class a { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } @@ -15,12 +21,12 @@ class b extends a { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt index 3d97822ef7d..243bcecb57d 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(7,7): error TS2416: Class 'b' incorrectly extends base class 'a': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type '() => string'. +tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. + + ==== tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts (4 errors) ==== class a { x() { @@ -7,19 +15,19 @@ class b extends a { ~ -!!! Class 'b' incorrectly extends base class 'a': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type '() => string'. +!!! error TS2416: Class 'b' incorrectly extends base class 'a': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type 'string' is not assignable to type '() => string'. get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. +!!! error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt index 85342038c54..98b9d349d64 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts (2 errors) ==== class a { x: string; @@ -6,12 +10,12 @@ class b extends a { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt index 8575f167c0b..3208de26bd4 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt @@ -1,25 +1,33 @@ +tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(10,7): error TS2416: Class 'b' incorrectly extends base class 'a': + Types of property 'x' are incompatible: + Type '() => string' is not assignable to type 'string'. +tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(11,5): error TS2426: Class 'a' defines instance member accessor 'x', but extended class 'b' defines it as instance member function. + + ==== tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts (4 errors) ==== class a { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } class b extends a { ~ -!!! Class 'b' incorrectly extends base class 'a': -!!! Types of property 'x' are incompatible: -!!! Type '() => string' is not assignable to type 'string'. +!!! error TS2416: Class 'b' incorrectly extends base class 'a': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type '() => string' is not assignable to type 'string'. x() { ~ -!!! Class 'a' defines instance member accessor 'x', but extended class 'b' defines it as instance member function. +!!! error TS2426: Class 'a' defines instance member accessor 'x', but extended class 'b' defines it as instance member function. return "20"; } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.errors.txt index 9c1fc8c565f..bf35b620e73 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/inheritanceMemberFuncOverridingProperty.ts(6,5): error TS2425: Class 'a' defines instance member property 'x', but extended class 'b' defines it as instance member function. + + ==== tests/cases/compiler/inheritanceMemberFuncOverridingProperty.ts (1 errors) ==== class a { x: () => string; @@ -6,7 +9,7 @@ class b extends a { x() { ~ -!!! Class 'a' defines instance member property 'x', but extended class 'b' defines it as instance member function. +!!! error TS2425: Class 'a' defines instance member property 'x', but extended class 'b' defines it as instance member function. return "20"; } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt index 45f6ed765df..ec8ec05a8ae 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt @@ -1,14 +1,18 @@ +tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts (2 errors) ==== class a { private __x: () => string; get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.__x; } set x(aValue: () => string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.__x = aValue; } } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt index 03a0e21de72..2b56866b22b 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/inheritanceMemberPropertyOverridingMethod.ts(8,5): error TS2424: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property. + + ==== tests/cases/compiler/inheritanceMemberPropertyOverridingMethod.ts (1 errors) ==== class a { x() { @@ -8,5 +11,5 @@ class b extends a { x: () => string; ~ -!!! Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property. +!!! error TS2424: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property. } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt index 74f1f1409e8..ae6a19c4530 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt @@ -1,13 +1,19 @@ +tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts (4 errors) ==== class a { static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } @@ -15,12 +21,12 @@ class b extends a { static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt index 47752c88765..eb8b181c1fd 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(7,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type '() => string'. + + ==== tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts (3 errors) ==== class a { static x() { @@ -7,17 +14,17 @@ class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type '() => string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type 'string' is not assignable to type '() => string'. static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt index 65d69802e8a..cdcbaa101e7 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts (2 errors) ==== class a { static x: string; @@ -6,12 +10,12 @@ class b extends a { static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt index 5b015fd54cd..46e079217b8 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt @@ -1,22 +1,29 @@ +tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(10,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': + Types of property 'x' are incompatible: + Type '() => string' is not assignable to type 'string'. + + ==== tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts (3 errors) ==== class a { static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type '() => string' is not assignable to type 'string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type '() => string' is not assignable to type 'string'. static x() { return "20"; } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt index 2c3804a5eba..1fa828f30c4 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.ts (1 errors) ==== class a { static get x(): () => string { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt index 346937240e1..3ecc7a44522 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts(5,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': + Types of property 'x' are incompatible: + Type '() => string' is not assignable to type 'string'. + + ==== tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts (1 errors) ==== class a { static x: string; @@ -5,9 +10,9 @@ class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type '() => string' is not assignable to type 'string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type '() => string' is not assignable to type 'string'. static x() { return "20"; } diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt b/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt index 92c0c6a83b1..01c276be81c 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/inheritanceStaticMembersIncompatible.ts(5,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': + Types of property 'x' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/inheritanceStaticMembersIncompatible.ts (1 errors) ==== class a { static x: string; @@ -5,8 +10,8 @@ class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type 'number' is not assignable to type 'string'. static x: number; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt index 3611d019a2a..08aab5b1158 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +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) ==== class a { static get x(): () => string { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null;; } static set x(aValue: () => string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt index 5498010bddb..f2137aab6f0 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts(7,7): error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type '() => string'. + + ==== tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts (1 errors) ==== class a { static x() { @@ -7,8 +12,8 @@ class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type '() => string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type 'string' is not assignable to type '() => string'. static x: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt b/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt index 7a1dcbe5a55..fd63eafbaf7 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/inheritedConstructorWithRestParams.ts(13,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/inheritedConstructorWithRestParams.ts(14,13): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/inheritedConstructorWithRestParams.ts (2 errors) ==== class Base { constructor(...a: string[]) { } @@ -13,7 +17,7 @@ // Errors new Derived("", 3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new Derived(3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt index c26643584c8..514d0d8941f 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/inheritedConstructorWithRestParams2.ts(32,13): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/inheritedConstructorWithRestParams2.ts(33,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/inheritedConstructorWithRestParams2.ts(34,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/inheritedConstructorWithRestParams2.ts (3 errors) ==== class IBaseBase { constructor(x: U) { } @@ -32,10 +37,10 @@ // Errors new Derived(3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new Derived("", 3, "", 3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new Derived("", 3, "", ""); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.errors.txt b/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.errors.txt index d02ddfbb148..d2ad69730da 100644 --- a/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.errors.txt +++ b/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases.ts(17,11): error TS2411: Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. +tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases.ts(23,11): error TS2411: Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. +tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases.ts(23,11): error TS2412: Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. +tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases.ts(25,11): error TS2411: Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. +tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases.ts(25,11): error TS2411: Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. +tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases.ts(25,11): error TS2412: Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. + + ==== tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases.ts (6 errors) ==== // indexer in B is a subtype of indexer in A interface A { @@ -17,7 +25,7 @@ interface D extends A, B, C { } // error because m is not a subtype of {a;} ~ -!!! Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2411: Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. interface E { 0: {}; @@ -25,16 +33,16 @@ interface F extends A, B, E { } // error because 0 is not a subtype of {a; b;} ~ -!!! Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2411: Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. ~ -!!! Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. +!!! error TS2412: Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. interface G extends A, B, C, E { } // should only report one error ~ -!!! Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2411: Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. ~ -!!! Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2411: Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. ~ -!!! Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. +!!! error TS2412: Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. interface H extends A, F { } // Should report no error at all because error is internal to F \ No newline at end of file diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt b/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt index ed90ca4d415..31816482cb5 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/inheritedModuleMembersForClodule.ts(7,7): error TS2418: Class static side 'typeof D' incorrectly extends base class static side 'typeof C': + Types of property 'foo' are incompatible: + Type '() => number' is not assignable to type '() => string': + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/inheritedModuleMembersForClodule.ts (1 errors) ==== class C { static foo(): string { @@ -7,10 +13,10 @@ class D extends C { ~ -!!! Class static side 'typeof D' incorrectly extends base class static side 'typeof C': -!!! Types of property 'foo' are incompatible: -!!! Type '() => number' is not assignable to type '() => string': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2418: Class static side 'typeof D' incorrectly extends base class static side 'typeof C': +!!! error TS2418: Types of property 'foo' are incompatible: +!!! error TS2418: Type '() => number' is not assignable to type '() => string': +!!! error TS2418: Type 'number' is not assignable to type 'string'. } module D { diff --git a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt index cd119798286..a7861a136ca 100644 --- a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt +++ b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(13,11): error TS2429: Interface 'E' incorrectly extends interface 'D': + Index signatures are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(28,11): error TS2429: Interface 'E2' incorrectly extends interface 'D2': + Index signatures are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts (2 errors) ==== // string indexer tests interface A { @@ -13,9 +21,9 @@ } interface E extends A, D { } // error ~ -!!! Interface 'E' incorrectly extends interface 'D': -!!! Index signatures are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'E' incorrectly extends interface 'D': +!!! error TS2429: Index signatures are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. // Same tests for number indexer @@ -32,6 +40,6 @@ } interface E2 extends A2, D2 { } // error ~~ -!!! Interface 'E2' incorrectly extends interface 'D2': -!!! Index signatures are incompatible: -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2429: Interface 'E2' incorrectly extends interface 'D2': +!!! error TS2429: Index signatures are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.errors.txt b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.errors.txt index de29e44ac46..8e6fc5b3158 100644 --- a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.errors.txt +++ b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes2.ts(18,11): error TS2413: Numeric index type '{}' is not assignable to string index type '{ a: any; }'. + + ==== tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes2.ts (1 errors) ==== // indexer in B is a subtype of indexer in A interface A { @@ -18,7 +21,7 @@ } interface E extends A, D { } // error ~ -!!! Numeric index type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2413: Numeric index type '{}' is not assignable to string index type '{ a: any; }'. interface F extends A, D { [s: number]: { diff --git a/tests/baselines/reference/initializerReferencingConstructorLocals.errors.txt b/tests/baselines/reference/initializerReferencingConstructorLocals.errors.txt index 56a9455608b..896552cabd5 100644 --- a/tests/baselines/reference/initializerReferencingConstructorLocals.errors.txt +++ b/tests/baselines/reference/initializerReferencingConstructorLocals.errors.txt @@ -1,46 +1,60 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(7,15): error TS1003: Identifier expected. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(17,15): error TS1003: Identifier expected. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(4,9): error TS2304: Cannot find name 'z'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(5,15): error TS2304: Cannot find name 'z'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(6,14): error TS2339: Property 'z' does not exist on type 'C'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(7,20): error TS2339: Property 'z' does not exist on type 'C'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(9,9): error TS2304: Cannot find name 'z'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(14,9): error TS2304: Cannot find name 'z'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(15,15): error TS2304: Cannot find name 'z'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(16,14): error TS2339: Property 'z' does not exist on type 'D'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(17,20): error TS2339: Property 'z' does not exist on type 'D'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(19,9): error TS2304: Cannot find name 'z'. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts (12 errors) ==== // Initializer expressions for instance member variables are evaluated in the scope of the class constructor body but are not permitted to reference parameters or local variables of the constructor. class C { a = z; // error ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. b: typeof z; // error ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. c = this.z; // error ~ -!!! Property 'z' does not exist on type 'C'. +!!! error TS2339: Property 'z' does not exist on type 'C'. d: typeof this.z; // error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! Property 'z' does not exist on type 'C'. +!!! error TS2339: Property 'z' does not exist on type 'C'. constructor(x) { z = 1; ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. } } class D { a = z; // error ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. b: typeof z; // error ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. c = this.z; // error ~ -!!! Property 'z' does not exist on type 'D'. +!!! error TS2339: Property 'z' does not exist on type 'D'. d: typeof this.z; // error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! Property 'z' does not exist on type 'D'. +!!! error TS2339: Property 'z' does not exist on type 'D'. constructor(x: T) { z = 1; ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. } } \ No newline at end of file diff --git a/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt b/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt index 6d137e173ce..465e3c42167 100644 --- a/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt +++ b/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt @@ -1,23 +1,31 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(17,15): error TS1003: Identifier expected. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(4,9): error TS2304: Cannot find name 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(5,15): error TS2304: Cannot find name 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(10,9): error TS2304: Cannot find name 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(11,15): error TS2304: Cannot find name 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(23,9): error TS2304: Cannot find name 'x'. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts (6 errors) ==== // Initializer expressions for instance member variables are evaluated in the scope of the class constructor body but are not permitted to reference parameters or local variables of the constructor. class C { a = x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. b: typeof x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor(x) { } } class D { a = x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. b: typeof x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor(public x) { } } @@ -25,7 +33,7 @@ a = this.x; // ok b: typeof this.x; // error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. constructor(public x) { } } @@ -33,6 +41,6 @@ a = this.x; // ok b = x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor(public x: T) { } } \ No newline at end of file diff --git a/tests/baselines/reference/initializersInDeclarations.errors.txt b/tests/baselines/reference/initializersInDeclarations.errors.txt index ff2555447ce..94736957365 100644 --- a/tests/baselines/reference/initializersInDeclarations.errors.txt +++ b/tests/baselines/reference/initializersInDeclarations.errors.txt @@ -1,3 +1,12 @@ +tests/cases/conformance/externalModules/initializersInDeclarations.ts(5,7): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/initializersInDeclarations.ts(6,14): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/initializersInDeclarations.ts(7,16): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/conformance/externalModules/initializersInDeclarations.ts(12,15): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/initializersInDeclarations.ts(13,15): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/initializersInDeclarations.ts(16,2): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/conformance/externalModules/initializersInDeclarations.ts(18,16): error TS1039: Initializers are not allowed in ambient contexts. + + ==== tests/cases/conformance/externalModules/initializersInDeclarations.ts (7 errors) ==== // Errors: Initializers & statements in declaration file @@ -5,30 +14,30 @@ declare class Foo { name = "test"; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. "some prop" = 42; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. fn(): boolean { ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. return false; } } declare var x = []; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. declare var y = {}; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. declare module M1 { while(true); ~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export var v1 = () => false; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/innerAliases.errors.txt b/tests/baselines/reference/innerAliases.errors.txt index f8010153c58..b5135c19d12 100644 --- a/tests/baselines/reference/innerAliases.errors.txt +++ b/tests/baselines/reference/innerAliases.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/innerAliases.ts(19,8): error TS2305: Module 'D' has no exported member 'inner'. +tests/cases/compiler/innerAliases.ts(21,11): error TS2339: Property 'inner' does not exist on type 'typeof D'. + + ==== tests/cases/compiler/innerAliases.ts (2 errors) ==== module A { export module B { @@ -19,10 +23,10 @@ var c: D.inner.Class1; ~~~~~~~~~~~~~~ -!!! Module 'D' has no exported member 'inner'. +!!! error TS2305: Module 'D' has no exported member 'inner'. c = new D.inner.Class1(); ~~~~~ -!!! Property 'inner' does not exist on type 'typeof D'. +!!! error TS2339: Property 'inner' does not exist on type 'typeof D'. \ No newline at end of file diff --git a/tests/baselines/reference/innerModExport1.errors.txt b/tests/baselines/reference/innerModExport1.errors.txt index 1f960cd37f7..11e9cdc01d1 100644 --- a/tests/baselines/reference/innerModExport1.errors.txt +++ b/tests/baselines/reference/innerModExport1.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/innerModExport1.ts(5,12): error TS1005: ';' expected. +tests/cases/compiler/innerModExport1.ts(7,9): error TS1129: Statement expected. +tests/cases/compiler/innerModExport1.ts(14,5): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/innerModExport1.ts(17,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/innerModExport1.ts(5,5): error TS2304: Cannot find name 'module'. + + ==== tests/cases/compiler/innerModExport1.ts (5 errors) ==== module Outer { @@ -5,13 +12,13 @@ var non_export_var: number; module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. var non_export_var = 0; export var export_var = 1; ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. function NonExportFunc() { return 0; } @@ -20,11 +27,11 @@ export var outer_var_export = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export function outerFuncExport() { return 0; } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. Outer.ExportFunc(); \ No newline at end of file diff --git a/tests/baselines/reference/innerModExport2.errors.txt b/tests/baselines/reference/innerModExport2.errors.txt index 59c6c4dde83..1adcc46d441 100644 --- a/tests/baselines/reference/innerModExport2.errors.txt +++ b/tests/baselines/reference/innerModExport2.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/innerModExport2.ts(5,12): error TS1005: ';' expected. +tests/cases/compiler/innerModExport2.ts(7,9): error TS1129: Statement expected. +tests/cases/compiler/innerModExport2.ts(15,5): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/innerModExport2.ts(18,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/innerModExport2.ts(5,5): error TS2304: Cannot find name 'module'. +tests/cases/compiler/innerModExport2.ts(20,7): error TS2339: Property 'NonExportFunc' does not exist on type 'typeof Outer'. + + ==== tests/cases/compiler/innerModExport2.ts (6 errors) ==== module Outer { @@ -5,13 +13,13 @@ var non_export_var: number; module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. var non_export_var = 0; export var export_var = 1; ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. function NonExportFunc() { return 0; } @@ -21,13 +29,13 @@ export var outer_var_export = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export function outerFuncExport() { return 0; } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. Outer.NonExportFunc(); ~~~~~~~~~~~~~ -!!! Property 'NonExportFunc' does not exist on type 'typeof Outer'. \ No newline at end of file +!!! error TS2339: Property 'NonExportFunc' does not exist on type 'typeof Outer'. \ No newline at end of file diff --git a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt index be79017314f..93f66768b35 100644 --- a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt +++ b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/innerTypeCheckOfLambdaArgument.ts(10,7): error TS2323: Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/innerTypeCheckOfLambdaArgument.ts (1 errors) ==== function takesCallback(callback: (n) =>any) { @@ -10,7 +13,7 @@ // otherwise, there's a bug in overload resolution / partial typechecking var k: string = 10; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. } ); \ No newline at end of file diff --git a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt index 124c3ab81df..06d2d76a6e1 100644 --- a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt +++ b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts(7,9): error TS2322: Type '() => void' is not assignable to type '(x: number) => number': + Type 'void' is not assignable to type 'number'. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts (1 errors) ==== class C { foo() { @@ -7,8 +11,8 @@ bar(x: number): number { C.prototype.bar = () => { } // error ~~~~~~~~~~~~~~~ -!!! Type '() => void' is not assignable to type '(x: number) => number': -!!! Type 'void' is not assignable to type 'number'. +!!! error TS2322: Type '() => void' is not assignable to type '(x: number) => number': +!!! error TS2322: Type 'void' is not assignable to type 'number'. C.prototype.bar = (x) => x; // ok C.prototype.bar = (x: number) => 1; // ok return 1; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt index b6cabdb962f..fbd64e5018e 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt @@ -1,15 +1,23 @@ +tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(26,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(29,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(19,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. +tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(41,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. + + ==== tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts (6 errors) ==== module NonGeneric { class C { x: string; get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set y(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: number, private b: number) { } } @@ -23,7 +31,7 @@ r.y = 4; var r6 = d.y(); // error ~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } @@ -32,12 +40,12 @@ x: T; get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } set y(v: U) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: T, private b: U) { } } @@ -51,5 +59,5 @@ r.y = ''; var r6 = d.y(); // error ~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } \ No newline at end of file diff --git a/tests/baselines/reference/instancePropertyInClassType.errors.txt b/tests/baselines/reference/instancePropertyInClassType.errors.txt index 79177eb22e9..9a7dce0f0cd 100644 --- a/tests/baselines/reference/instancePropertyInClassType.errors.txt +++ b/tests/baselines/reference/instancePropertyInClassType.errors.txt @@ -1,15 +1,23 @@ +tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(24,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(27,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(17,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. +tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(37,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. + + ==== tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts (6 errors) ==== module NonGeneric { class C { x: string; get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set y(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: number, private b: number) { } } @@ -21,7 +29,7 @@ r.y = 4; var r6 = c.y(); // error ~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } @@ -30,12 +38,12 @@ x: T; get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } set y(v: U) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: T, private b: U) { } } @@ -47,5 +55,5 @@ r.y = ''; var r6 = c.y(); // error ~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } \ No newline at end of file diff --git a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt index d123ec33f9f..dab3c0279bc 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt +++ b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/instanceSubtypeCheck2.ts(5,7): error TS2416: Class 'C2' incorrectly extends base class 'C1': + Types of property 'x' are incompatible: + Type 'string' is not assignable to type 'C2': + Property 'x' is missing in type 'String'. + + ==== tests/cases/compiler/instanceSubtypeCheck2.ts (1 errors) ==== class C1 { x: C2; @@ -5,9 +11,9 @@ class C2 extends C1 { ~~ -!!! Class 'C2' incorrectly extends base class 'C1': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'C2': -!!! Property 'x' is missing in type 'String'. +!!! error TS2416: Class 'C2' incorrectly extends base class 'C1': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type 'string' is not assignable to type 'C2': +!!! error TS2416: Property 'x' is missing in type 'String'. x: string } \ No newline at end of file diff --git a/tests/baselines/reference/instanceofOperator.errors.txt b/tests/baselines/reference/instanceofOperator.errors.txt index df7ed3991cb..15d55188741 100644 --- a/tests/baselines/reference/instanceofOperator.errors.txt +++ b/tests/baselines/reference/instanceofOperator.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/instanceofOperator.ts(6,7): error TS2300: Duplicate identifier 'Object'. +tests/cases/compiler/instanceofOperator.ts(11,1): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/compiler/instanceofOperator.ts(14,16): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/compiler/instanceofOperator.ts(15,19): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/compiler/instanceofOperator.ts(18,1): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/compiler/instanceofOperator.ts(20,1): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. + + ==== tests/cases/compiler/instanceofOperator.ts (6 errors) ==== // Spec: // The instanceof operator requires the left operand to be of type Any or an object type, and the right @@ -6,30 +14,30 @@ class Object { } ~~~~~~ -!!! Duplicate identifier 'Object'. +!!! error TS2300: Duplicate identifier 'Object'. var obj: Object; 4 instanceof null; ~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. // Error and should be error obj instanceof 4; ~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. Object instanceof obj; ~~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. // Error on left hand side null instanceof null; ~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. obj instanceof Object; undefined instanceof undefined; ~~~~~~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.errors.txt index f5698b29c6b..49b5fbc0cd0 100644 --- a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.errors.txt @@ -1,3 +1,26 @@ +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(14,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(15,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(16,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(17,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(18,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(19,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(20,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(21,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(22,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(34,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(35,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(36,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(37,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(38,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(39,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(40,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(41,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(42,24): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(43,25): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(46,11): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts(46,25): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. + + ==== tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts (21 errors) ==== class C { foo() { } @@ -14,31 +37,31 @@ var ra1 = a1 instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra2 = a2 instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra3 = a3 instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra4 = a4 instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra5 = 0 instanceof x; ~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra6 = true instanceof x; ~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra7 = '' instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra8 = null instanceof x; ~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra9 = undefined instanceof x; ~~~~~~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. // invalid right operand // the right operand to be of type Any or a subtype of the 'Function' interface type @@ -52,38 +75,38 @@ var rb1 = x instanceof b1; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb2 = x instanceof b2; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb3 = x instanceof b3; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb4 = x instanceof b4; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb5 = x instanceof 0; ~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb6 = x instanceof true; ~~~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb7 = x instanceof ''; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb8 = x instanceof o1; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb9 = x instanceof o2; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb10 = x instanceof o3; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. // both operands are invalid var rc1 = '' instanceof {}; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. \ No newline at end of file +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. \ No newline at end of file diff --git a/tests/baselines/reference/instantiateConstraintsToTypeArguments2.errors.txt b/tests/baselines/reference/instantiateConstraintsToTypeArguments2.errors.txt index 1f74e2c9e56..f5d53c582f6 100644 --- a/tests/baselines/reference/instantiateConstraintsToTypeArguments2.errors.txt +++ b/tests/baselines/reference/instantiateConstraintsToTypeArguments2.errors.txt @@ -1,11 +1,17 @@ +tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts(1,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts(1,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts(2,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts(2,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts (4 errors) ==== interface A, S extends A> { } ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. interface B, S extends B> extends A, B> { } ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. \ No newline at end of file +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. \ No newline at end of file diff --git a/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.errors.txt b/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.errors.txt index d058f42951b..5162cd28fd5 100644 --- a/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateGenericClassWithWrongNumberOfTypeArguments.ts(8,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateGenericClassWithWrongNumberOfTypeArguments.ts(16,9): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateGenericClassWithWrongNumberOfTypeArguments.ts (2 errors) ==== // it is always an error to provide a type argument list whose count does not match the type parameter list // both of these attempts to construct a type is an error @@ -8,7 +12,7 @@ var c = new C(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class D { x: T @@ -18,4 +22,4 @@ // BUG 794238 var d = new D(); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.errors.txt b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.errors.txt index 8129005313e..8322fd3b2e4 100644 --- a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.errors.txt +++ b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts(8,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts(11,9): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts(11,9): error TS2350: Only a void function can be called with the 'new' keyword. +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts(14,10): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts(14,10): error TS2350: Only a void function can be called with the 'new' keyword. +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts(18,10): error TS2347: Untyped function calls may not accept type arguments. + + ==== tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts (6 errors) ==== // it is an error to provide type arguments to a non-generic call // all of these are errors @@ -8,24 +16,24 @@ var c = new C(); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. function Foo(): void { } var r = new Foo(); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var f: { (): void }; var r2 = new f(); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var a: any; // BUG 790977 var r2 = new a(); ~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. \ No newline at end of file +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/instantiateTypeParameter.errors.txt b/tests/baselines/reference/instantiateTypeParameter.errors.txt index 6d5a507f475..40967ba586f 100644 --- a/tests/baselines/reference/instantiateTypeParameter.errors.txt +++ b/tests/baselines/reference/instantiateTypeParameter.errors.txt @@ -1,12 +1,18 @@ +tests/cases/compiler/instantiateTypeParameter.ts(2,5): error TS1131: Property or signature expected. +tests/cases/compiler/instantiateTypeParameter.ts(2,13): error TS1099: Type argument list cannot be empty. +tests/cases/compiler/instantiateTypeParameter.ts(3,1): error TS1128: Declaration or statement expected. +tests/cases/compiler/instantiateTypeParameter.ts(2,12): error TS2304: Cannot find name 'T'. + + ==== tests/cases/compiler/instantiateTypeParameter.ts (4 errors) ==== interface Foo { var x: T<>; ~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ~~ -!!! Type argument list cannot be empty. +!!! error TS1099: Type argument list cannot be empty. ~~~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/instantiatedBaseTypeConstraints.errors.txt b/tests/baselines/reference/instantiatedBaseTypeConstraints.errors.txt index 489103dc682..db62abe5688 100644 --- a/tests/baselines/reference/instantiatedBaseTypeConstraints.errors.txt +++ b/tests/baselines/reference/instantiatedBaseTypeConstraints.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/instantiatedBaseTypeConstraints.ts(1,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/instantiatedBaseTypeConstraints.ts (1 errors) ==== interface Foo, C> { ~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(bar: C): void; } diff --git a/tests/baselines/reference/instantiatedBaseTypeConstraints2.errors.txt b/tests/baselines/reference/instantiatedBaseTypeConstraints2.errors.txt index f80877a9142..d5c6d838a84 100644 --- a/tests/baselines/reference/instantiatedBaseTypeConstraints2.errors.txt +++ b/tests/baselines/reference/instantiatedBaseTypeConstraints2.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/instantiatedBaseTypeConstraints2.ts(1,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/instantiatedBaseTypeConstraints2.ts(1,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/instantiatedBaseTypeConstraints2.ts (2 errors) ==== interface A, S extends A> { } ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. interface B extends A, B> { } \ No newline at end of file diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index 29462bbf527..6fdf7ea2aa8 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -1,3 +1,96 @@ +tests/cases/compiler/intTypeCheck.ts(35,6): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/intTypeCheck.ts(36,5): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/intTypeCheck.ts(37,6): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/intTypeCheck.ts(70,6): error TS1022: An index signature parameter must have a type annotation. +tests/cases/compiler/intTypeCheck.ts(71,5): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/intTypeCheck.ts(72,6): error TS1096: An index signature must have exactly one parameter. +tests/cases/compiler/intTypeCheck.ts(104,20): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(118,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(132,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(146,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(160,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(174,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(188,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(202,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(83,5): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/intTypeCheck.ts(97,5): error TS2322: Type 'Object' is not assignable to type 'i1': + Property 'p' is missing in type 'Object'. +tests/cases/compiler/intTypeCheck.ts(98,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'i1': + Property 'p' is missing in type 'Base'. +tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type '() => void' is not assignable to type 'i1': + Property 'p' is missing in type '() => void'. +tests/cases/compiler/intTypeCheck.ts(104,5): error TS2322: Type 'boolean' is not assignable to type 'i1': + Property 'p' is missing in type 'Boolean'. +tests/cases/compiler/intTypeCheck.ts(104,21): error TS2304: Cannot find name 'i1'. +tests/cases/compiler/intTypeCheck.ts(105,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(110,5): error TS2323: Type '{}' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(111,5): error TS2323: Type 'Object' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(112,17): error TS2350: Only a void function can be called with the 'new' keyword. +tests/cases/compiler/intTypeCheck.ts(113,5): error TS2323: Type 'Base' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(118,5): error TS2323: Type 'boolean' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(118,22): error TS2304: Cannot find name 'i2'. +tests/cases/compiler/intTypeCheck.ts(119,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(124,5): error TS2323: Type '{}' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(125,5): error TS2323: Type 'Object' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(127,5): error TS2323: Type 'Base' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(129,5): error TS2323: Type '() => void' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(132,5): error TS2323: Type 'boolean' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(132,22): error TS2304: Cannot find name 'i3'. +tests/cases/compiler/intTypeCheck.ts(133,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(139,5): error TS2322: Type 'Object' is not assignable to type 'i4': + Index signature is missing in type 'Object'. +tests/cases/compiler/intTypeCheck.ts(140,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(141,5): error TS2322: Type 'Base' is not assignable to type 'i4': + Index signature is missing in type 'Base'. +tests/cases/compiler/intTypeCheck.ts(143,5): error TS2322: Type '() => void' is not assignable to type 'i4': + Index signature is missing in type '() => void'. +tests/cases/compiler/intTypeCheck.ts(146,5): error TS2322: Type 'boolean' is not assignable to type 'i4': + Index signature is missing in type 'Boolean'. +tests/cases/compiler/intTypeCheck.ts(146,22): error TS2304: Cannot find name 'i4'. +tests/cases/compiler/intTypeCheck.ts(147,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(152,5): error TS2322: Type '{}' is not assignable to type 'i5': + Property 'p' is missing in type '{}'. +tests/cases/compiler/intTypeCheck.ts(153,5): error TS2322: Type 'Object' is not assignable to type 'i5': + Property 'p' is missing in type 'Object'. +tests/cases/compiler/intTypeCheck.ts(154,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(155,5): error TS2322: Type 'Base' is not assignable to type 'i5': + Property 'p' is missing in type 'Base'. +tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type '() => void' is not assignable to type 'i5': + Property 'p' is missing in type '() => void'. +tests/cases/compiler/intTypeCheck.ts(160,5): error TS2322: Type 'boolean' is not assignable to type 'i5': + Property 'p' is missing in type 'Boolean'. +tests/cases/compiler/intTypeCheck.ts(160,22): error TS2304: Cannot find name 'i5'. +tests/cases/compiler/intTypeCheck.ts(161,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(166,5): error TS2323: Type '{}' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(167,5): error TS2323: Type 'Object' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(168,17): error TS2350: Only a void function can be called with the 'new' keyword. +tests/cases/compiler/intTypeCheck.ts(169,5): error TS2323: Type 'Base' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(171,5): error TS2322: Type '() => void' is not assignable to type 'i6': + Type 'void' is not assignable to type 'number'. +tests/cases/compiler/intTypeCheck.ts(174,5): error TS2323: Type 'boolean' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(174,22): error TS2304: Cannot find name 'i6'. +tests/cases/compiler/intTypeCheck.ts(175,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(180,5): error TS2323: Type '{}' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(181,5): error TS2323: Type 'Object' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(183,17): error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other. +tests/cases/compiler/intTypeCheck.ts(185,5): error TS2323: Type '() => void' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(188,5): error TS2323: Type 'boolean' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(188,22): error TS2304: Cannot find name 'i7'. +tests/cases/compiler/intTypeCheck.ts(189,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(195,5): error TS2322: Type 'Object' is not assignable to type 'i8': + Index signature is missing in type 'Object'. +tests/cases/compiler/intTypeCheck.ts(196,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(197,5): error TS2322: Type 'Base' is not assignable to type 'i8': + Index signature is missing in type 'Base'. +tests/cases/compiler/intTypeCheck.ts(199,5): error TS2322: Type '() => void' is not assignable to type 'i8': + Index signature is missing in type '() => void'. +tests/cases/compiler/intTypeCheck.ts(202,5): error TS2322: Type 'boolean' is not assignable to type 'i8': + Index signature is missing in type 'Boolean'. +tests/cases/compiler/intTypeCheck.ts(202,22): error TS2304: Cannot find name 'i8'. +tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. + + ==== tests/cases/compiler/intTypeCheck.ts (73 errors) ==== interface i1 { //Property Signatures @@ -35,13 +128,13 @@ //Index Signatures [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. } interface i5 extends i1 { } interface i6 extends i2 { } @@ -76,13 +169,13 @@ //Index Signatures [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signatures p; @@ -95,7 +188,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } var anyVar: any; @@ -111,93 +204,93 @@ }; var obj2: i1 = new Object(); ~~~~ -!!! Type 'Object' is not assignable to type 'i1': -!!! Property 'p' is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i1': +!!! error TS2322: Property 'p' is missing in type 'Object'. var obj3: i1 = new obj0; ~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj4: i1 = new Base; ~~~~ -!!! Type 'Base' is not assignable to type 'i1': -!!! Property 'p' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i1': +!!! error TS2322: Property 'p' is missing in type 'Base'. var obj5: i1 = null; var obj6: i1 = function () { }; ~~~~ -!!! Type '() => void' is not assignable to type 'i1': -!!! Property 'p' is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i1': +!!! error TS2322: Property 'p' is missing in type '() => void'. //var obj7: i1 = function foo() { }; var obj8: i1 = anyVar; var obj9: i1 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~ -!!! Type 'boolean' is not assignable to type 'i1': -!!! Property 'p' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i1': +!!! error TS2322: Property 'p' is missing in type 'Boolean'. ~~ -!!! Cannot find name 'i1'. +!!! error TS2304: Cannot find name 'i1'. var obj10: i1 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Call signatures // var obj11: i2; var obj12: i2 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i2'. +!!! error TS2323: Type '{}' is not assignable to type 'i2'. var obj13: i2 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i2'. +!!! error TS2323: Type 'Object' is not assignable to type 'i2'. var obj14: i2 = new obj11; ~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var obj15: i2 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i2'. +!!! error TS2323: Type 'Base' is not assignable to type 'i2'. var obj16: i2 = null; var obj17: i2 = function ():any { return 0; }; //var obj18: i2 = function foo() { }; var obj19: i2 = anyVar; var obj20: i2 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i2'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i2'. ~~ -!!! Cannot find name 'i2'. +!!! error TS2304: Cannot find name 'i2'. var obj21: i2 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Construct Signatures // var obj22: i3; var obj23: i3 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i3'. +!!! error TS2323: Type '{}' is not assignable to type 'i3'. var obj24: i3 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i3'. +!!! error TS2323: Type 'Object' is not assignable to type 'i3'. var obj25: i3 = new obj22; var obj26: i3 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i3'. +!!! error TS2323: Type 'Base' is not assignable to type 'i3'. var obj27: i3 = null; var obj28: i3 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i3'. +!!! error TS2323: Type '() => void' is not assignable to type 'i3'. //var obj29: i3 = function foo() { }; var obj30: i3 = anyVar; var obj31: i3 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i3'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i3'. ~~ -!!! Cannot find name 'i3'. +!!! error TS2304: Cannot find name 'i3'. var obj32: i3 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Index Signatures // @@ -205,133 +298,133 @@ var obj34: i4 = {}; var obj35: i4 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i4': -!!! Index signature is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i4': +!!! error TS2322: Index signature is missing in type 'Object'. var obj36: i4 = new obj33; ~~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj37: i4 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i4': -!!! Index signature is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i4': +!!! error TS2322: Index signature is missing in type 'Base'. var obj38: i4 = null; var obj39: i4 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i4': -!!! Index signature is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i4': +!!! error TS2322: Index signature is missing in type '() => void'. //var obj40: i4 = function foo() { }; var obj41: i4 = anyVar; var obj42: i4 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i4': -!!! Index signature is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i4': +!!! error TS2322: Index signature is missing in type 'Boolean'. ~~ -!!! Cannot find name 'i4'. +!!! error TS2304: Cannot find name 'i4'. var obj43: i4 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I1 // var obj44: i5; var obj45: i5 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i5': -!!! Property 'p' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type '{}'. var obj46: i5 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i5': -!!! Property 'p' is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type 'Object'. var obj47: i5 = new obj44; ~~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj48: i5 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i5': -!!! Property 'p' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type 'Base'. var obj49: i5 = null; var obj50: i5 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i5': -!!! Property 'p' is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type '() => void'. //var obj51: i5 = function foo() { }; var obj52: i5 = anyVar; var obj53: i5 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i5': -!!! Property 'p' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type 'Boolean'. ~~ -!!! Cannot find name 'i5'. +!!! error TS2304: Cannot find name 'i5'. var obj54: i5 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I2 // var obj55: i6; var obj56: i6 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i6'. +!!! error TS2323: Type '{}' is not assignable to type 'i6'. var obj57: i6 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i6'. +!!! error TS2323: Type 'Object' is not assignable to type 'i6'. var obj58: i6 = new obj55; ~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var obj59: i6 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i6'. +!!! error TS2323: Type 'Base' is not assignable to type 'i6'. var obj60: i6 = null; var obj61: i6 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i6': -!!! Type 'void' is not assignable to type 'number'. +!!! error TS2322: Type '() => void' is not assignable to type 'i6': +!!! error TS2322: Type 'void' is not assignable to type 'number'. //var obj62: i6 = function foo() { }; var obj63: i6 = anyVar; var obj64: i6 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i6'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i6'. ~~ -!!! Cannot find name 'i6'. +!!! error TS2304: Cannot find name 'i6'. var obj65: i6 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I3 // var obj66: i7; var obj67: i7 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i7'. +!!! error TS2323: Type '{}' is not assignable to type 'i7'. var obj68: i7 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i7'. +!!! error TS2323: Type 'Object' is not assignable to type 'i7'. var obj69: i7 = new obj66; var obj70: i7 = new Base; ~~~~~~~~~~~~ -!!! Neither type 'Base' nor type 'i7' is assignable to the other. +!!! error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other. var obj71: i7 = null; var obj72: i7 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i7'. +!!! error TS2323: Type '() => void' is not assignable to type 'i7'. //var obj73: i7 = function foo() { }; var obj74: i7 = anyVar; var obj75: i7 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i7'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i7'. ~~ -!!! Cannot find name 'i7'. +!!! error TS2304: Cannot find name 'i7'. var obj76: i7 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I4 // @@ -339,30 +432,30 @@ var obj78: i8 = {}; var obj79: i8 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i8': -!!! Index signature is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i8': +!!! error TS2322: Index signature is missing in type 'Object'. var obj80: i8 = new obj77; ~~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj81: i8 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i8': -!!! Index signature is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i8': +!!! error TS2322: Index signature is missing in type 'Base'. var obj82: i8 = null; var obj83: i8 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i8': -!!! Index signature is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i8': +!!! error TS2322: Index signature is missing in type '() => void'. //var obj84: i8 = function foo() { }; var obj85: i8 = anyVar; var obj86: i8 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i8': -!!! Index signature is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i8': +!!! error TS2322: Index signature is missing in type 'Boolean'. ~~ -!!! Cannot find name 'i8'. +!!! error TS2304: Cannot find name 'i8'. var obj87: i8 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt index 663cb9a56ca..bd5a7a46f91 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt +++ b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/interfaceAssignmentCompat.ts(32,18): error TS2345: Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'. +tests/cases/compiler/interfaceAssignmentCompat.ts(37,29): error TS2339: Property '_map' does not exist on type 'typeof Color'. +tests/cases/compiler/interfaceAssignmentCompat.ts(42,13): error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye': + Property 'coleur' is missing in type 'IEye'. +tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2322: Type 'IEye[]' is not assignable to type 'IFrenchEye[]': + Type 'IEye' is not assignable to type 'IFrenchEye'. + + ==== tests/cases/compiler/interfaceAssignmentCompat.ts (4 errors) ==== module M { export enum Color { @@ -32,27 +40,27 @@ x=x.sort(CompareYeux); // parameter mismatch ~~~~~~~~~~~ -!!! Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'. +!!! error TS2345: Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'. // type of z inferred from specialized array type var z=x.sort(CompareEyes); // ok for (var i=0,len=z.length;i=0;j--) { eeks[j]=z[j]; // nope: element assignment ~~~~~~~ -!!! Type 'IEye' is not assignable to type 'IFrenchEye': -!!! Property 'coleur' is missing in type 'IEye'. +!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye': +!!! error TS2322: Property 'coleur' is missing in type 'IEye'. } eeks=z; // nope: array assignment ~~~~ -!!! Type 'IEye[]' is not assignable to type 'IFrenchEye[]': -!!! Type 'IEye' is not assignable to type 'IFrenchEye'. +!!! error TS2322: Type 'IEye[]' is not assignable to type 'IFrenchEye[]': +!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'. return result; } } diff --git a/tests/baselines/reference/interfaceDeclaration1.errors.txt b/tests/baselines/reference/interfaceDeclaration1.errors.txt index 512f49776e2..a9654fabdcf 100644 --- a/tests/baselines/reference/interfaceDeclaration1.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration1.errors.txt @@ -1,16 +1,26 @@ +tests/cases/compiler/interfaceDeclaration1.ts(3,5): error TS2300: Duplicate identifier 'item'. +tests/cases/compiler/interfaceDeclaration1.ts(8,5): error TS2300: Duplicate identifier 'item'. +tests/cases/compiler/interfaceDeclaration1.ts(22,11): error TS2310: Type 'I5' recursively references itself as a base type. +tests/cases/compiler/interfaceDeclaration1.ts(35,7): error TS2421: Class 'C1' incorrectly implements interface 'I3': + Property 'prototype' is missing in type 'C1'. +tests/cases/compiler/interfaceDeclaration1.ts(41,11): error TS2310: Type 'i8' recursively references itself as a base type. +tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11': + Named properties 'foo' of types 'i10' and 'i11' are not identical. + + ==== tests/cases/compiler/interfaceDeclaration1.ts (6 errors) ==== interface I1 { item:number; item:number; ~~~~ -!!! Duplicate identifier 'item'. +!!! error TS2300: Duplicate identifier 'item'. } interface I2 { item:any; item:number; ~~~~ -!!! Duplicate identifier 'item'. +!!! error TS2300: Duplicate identifier 'item'. } interface I3 { @@ -26,7 +36,7 @@ interface I5 extends I5 { ~~ -!!! Type 'I5' recursively references itself as a base type. +!!! error TS2310: Type 'I5' recursively references itself as a base type. foo():void; } @@ -41,8 +51,8 @@ class C1 implements I3 { ~~ -!!! Class 'C1' incorrectly implements interface 'I3': -!!! Property 'prototype' is missing in type 'C1'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I3': +!!! error TS2421: Property 'prototype' is missing in type 'C1'. constructor() { var prototype: number = 3; } @@ -50,7 +60,7 @@ interface i8 extends i9 { } ~~ -!!! Type 'i8' recursively references itself as a base type. +!!! error TS2310: Type 'i8' recursively references itself as a base type. interface i9 extends i8 { } interface i10 { @@ -63,6 +73,6 @@ interface i12 extends i10, i11 { } ~~~ -!!! Interface 'i12' cannot simultaneously extend types 'i10' and 'i11': -!!! Named properties 'foo' of types 'i10' and 'i11' are not identical. +!!! error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11': +!!! error TS2320: Named properties 'foo' of types 'i10' and 'i11' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration2.errors.txt b/tests/baselines/reference/interfaceDeclaration2.errors.txt index a7ee7796372..8ef5e1a40d7 100644 --- a/tests/baselines/reference/interfaceDeclaration2.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/interfaceDeclaration2.ts(5,7): error TS2300: Duplicate identifier 'I2'. + + ==== tests/cases/compiler/interfaceDeclaration2.ts (1 errors) ==== interface I1 { } module I1 { } @@ -5,7 +8,7 @@ interface I2 { } class I2 { } ~~ -!!! Duplicate identifier 'I2'. +!!! error TS2300: Duplicate identifier 'I2'. interface I3 { } function I3() { } diff --git a/tests/baselines/reference/interfaceDeclaration3.errors.txt b/tests/baselines/reference/interfaceDeclaration3.errors.txt index f3a861a849b..d58a77b2e12 100644 --- a/tests/baselines/reference/interfaceDeclaration3.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration3.errors.txt @@ -1,3 +1,14 @@ +tests/cases/compiler/interfaceDeclaration3.ts(6,11): error TS2421: Class 'C1' incorrectly implements interface 'I1': + Types of property 'item' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/interfaceDeclaration3.ts(31,11): error TS2421: Class 'C1' incorrectly implements interface 'I1': + Types of property 'item' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/interfaceDeclaration3.ts(54,11): error TS2429: Interface 'I2' incorrectly extends interface 'I1': + Types of property 'item' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/interfaceDeclaration3.ts (3 errors) ==== interface I1 { item:number; } @@ -6,9 +17,9 @@ interface I2 { item:number; } class C1 implements I1 { ~~ -!!! Class 'C1' incorrectly implements interface 'I1': -!!! Types of property 'item' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': +!!! error TS2421: Types of property 'item' are incompatible: +!!! error TS2421: Type 'number' is not assignable to type 'string'. public item:number; } class C2 implements I1 { @@ -35,9 +46,9 @@ } class C1 implements I1 { ~~ -!!! Class 'C1' incorrectly implements interface 'I1': -!!! Types of property 'item' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': +!!! error TS2421: Types of property 'item' are incompatible: +!!! error TS2421: Type 'number' is not assignable to type 'string'. public item:number; } class C2 implements I1 { @@ -62,7 +73,7 @@ interface I2 extends I1 { item:string; } ~~ -!!! Interface 'I2' incorrectly extends interface 'I1': -!!! Types of property 'item' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'I1': +!!! error TS2429: Types of property 'item' are incompatible: +!!! error TS2429: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration4.errors.txt b/tests/baselines/reference/interfaceDeclaration4.errors.txt index 3f81ffba644..7092cda3dc2 100644 --- a/tests/baselines/reference/interfaceDeclaration4.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration4.errors.txt @@ -1,3 +1,15 @@ +tests/cases/compiler/interfaceDeclaration4.ts(39,14): error TS1005: '{' expected. +tests/cases/compiler/interfaceDeclaration4.ts(39,18): error TS1005: ';' expected. +tests/cases/compiler/interfaceDeclaration4.ts(18,11): error TS2429: Interface 'I3' incorrectly extends interface 'I1': + Types of property 'item' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/interfaceDeclaration4.ts(27,7): error TS2421: Class 'C2' incorrectly implements interface 'I4': + Property 'item' is missing in type 'C2'. +tests/cases/compiler/interfaceDeclaration4.ts(36,7): error TS2421: Class 'C3' incorrectly implements interface 'I1': + Property 'item' is missing in type 'C3'. +tests/cases/compiler/interfaceDeclaration4.ts(39,15): error TS2304: Cannot find name 'I1'. + + ==== tests/cases/compiler/interfaceDeclaration4.ts (6 errors) ==== // Import this module when test harness supports external modules. Also remove the internal module below. // import Foo = require("interfaceDeclaration5") @@ -18,9 +30,9 @@ // Negative Case interface I3 extends Foo.I1 { ~~ -!!! Interface 'I3' incorrectly extends interface 'I1': -!!! Types of property 'item' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'I3' incorrectly extends interface 'I1': +!!! error TS2429: Types of property 'item' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. item:number; } @@ -31,8 +43,8 @@ // Err - not implemented item class C2 implements I4 { ~~ -!!! Class 'C2' incorrectly implements interface 'I4': -!!! Property 'item' is missing in type 'C2'. +!!! error TS2421: Class 'C2' incorrectly implements interface 'I4': +!!! error TS2421: Property 'item' is missing in type 'C2'. public token: string; } @@ -43,15 +55,15 @@ class C3 implements Foo.I1 { } ~~ -!!! Class 'C3' incorrectly implements interface 'I1': -!!! Property 'item' is missing in type 'C3'. +!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': +!!! error TS2421: Property 'item' is missing in type 'C3'. // Negative case interface Foo.I1 { } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~ -!!! Cannot find name 'I1'. +!!! error TS2304: Cannot find name 'I1'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration6.errors.txt b/tests/baselines/reference/interfaceDeclaration6.errors.txt index a517250e9b9..9cf0606d8bf 100644 --- a/tests/baselines/reference/interfaceDeclaration6.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration6.errors.txt @@ -1,11 +1,16 @@ +tests/cases/compiler/interfaceDeclaration6.ts(3,11): error TS2429: Interface 'i3' incorrectly extends interface 'i1': + Types of property 'foo' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/interfaceDeclaration6.ts (1 errors) ==== interface i1 { foo: number; }; interface i2 extends i1 { foo: number; }; interface i3 extends i1 { foo: string; }; ~~ -!!! Interface 'i3' incorrectly extends interface 'i1': -!!! Types of property 'foo' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'i3' incorrectly extends interface 'i1': +!!! error TS2429: Types of property 'foo' are incompatible: +!!! error TS2429: Type 'string' is not assignable to type 'number'. interface i4 { bar():any; bar():any; diff --git a/tests/baselines/reference/interfaceExtendingClass.errors.txt b/tests/baselines/reference/interfaceExtendingClass.errors.txt index 7600d983fd7..66a75a1c998 100644 --- a/tests/baselines/reference/interfaceExtendingClass.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClass.errors.txt @@ -1,10 +1,13 @@ +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass.ts (1 errors) ==== class Foo { x: string; y() { } get Z() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } [x: string]: Object; diff --git a/tests/baselines/reference/interfaceExtendingClass2.errors.txt b/tests/baselines/reference/interfaceExtendingClass2.errors.txt index 7bd8509ee2f..bff97f4c088 100644 --- a/tests/baselines/reference/interfaceExtendingClass2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClass2.errors.txt @@ -1,10 +1,18 @@ +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts(13,13): error TS1108: A 'return' statement can only be used within a function body. +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(15,5): error TS1128: Declaration or statement expected. +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 (6 errors) ==== class Foo { x: string; y() { } get Z() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } [x: string]: Object; @@ -15,15 +23,15 @@ ~~~~ toString: () => { ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'a' of type '{ toString: () => {}; }' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'a' of type '{ toString: () => {}; }' is not assignable to string index type 'Object'. return 1; ~~~~~~ -!!! A 'return' statement can only be used within a function body. +!!! error TS1108: A 'return' statement can only be used within a function body. ~~~~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. }; ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt index 525f9e2d517..f7abe9cb128 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(5,11): error TS2429: Interface 'I' incorrectly extends interface 'Foo': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(15,10): error TS2341: Property 'Foo.x' is inaccessible. + + ==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts (2 errors) ==== class Foo { private x: string; @@ -5,8 +10,8 @@ interface I extends Foo { // error ~ -!!! Interface 'I' incorrectly extends interface 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'I' incorrectly extends interface 'Foo': +!!! error TS2429: Private property 'x' cannot be reimplemented. x: string; } @@ -18,4 +23,4 @@ var r = i.y; var r2 = i.x; // error ~~~ -!!! Property 'Foo.x' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'Foo.x' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt index 9af19f5f67e..77ed7a486bf 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(9,11): error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': + Named properties 'x' of types 'Foo' and 'Bar' are not identical. +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(12,11): error TS2429: Interface 'I4' incorrectly extends interface 'Bar': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(12,11): error TS2429: Interface 'I4' incorrectly extends interface 'Foo': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(26,10): error TS2341: Property 'Foo.x' is inaccessible. +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(27,10): error TS2341: Property 'Baz.y' is inaccessible. + + ==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts (5 errors) ==== class Foo { private x: string; @@ -9,17 +19,17 @@ interface I3 extends Foo, Bar { // error ~~ -!!! Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': -!!! Named properties 'x' of types 'Foo' and 'Bar' are not identical. +!!! error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': +!!! error TS2320: Named properties 'x' of types 'Foo' and 'Bar' are not identical. } interface I4 extends Foo, Bar { // error ~~ -!!! Interface 'I4' incorrectly extends interface 'Bar': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'I4' incorrectly extends interface 'Bar': +!!! error TS2429: Private property 'x' cannot be reimplemented. ~~ -!!! Interface 'I4' incorrectly extends interface 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'I4' incorrectly extends interface 'Foo': +!!! error TS2429: Private property 'x' cannot be reimplemented. x: string; } @@ -35,7 +45,7 @@ var r: string = i.z; var r2 = i.x; // error ~~~ -!!! Property 'Foo.x' is inaccessible. +!!! error TS2341: Property 'Foo.x' is inaccessible. var r3 = i.y; // error ~~~ -!!! Property 'Baz.y' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'Baz.y' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt index e9864c85b6b..919bdaea17d 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(21,1): error TS2322: Type 'C' is not assignable to type 'I': + Property 'other' is missing in type 'C'. +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(24,1): error TS2322: Type 'I' is not assignable to type 'D': + Property 'bar' is missing in type 'I'. +tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(27,1): error TS2322: Type 'C' is not assignable to type 'D': + Property 'other' is missing in type 'C'. + + ==== tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts (3 errors) ==== class C { public foo(x: any) { return x; } @@ -21,17 +29,17 @@ c = i; i = c; // error ~ -!!! Type 'C' is not assignable to type 'I': -!!! Property 'other' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'I': +!!! error TS2322: Property 'other' is missing in type 'C'. i = d; d = i; // error ~ -!!! Type 'I' is not assignable to type 'D': -!!! Property 'bar' is missing in type 'I'. +!!! error TS2322: Type 'I' is not assignable to type 'D': +!!! error TS2322: Property 'bar' is missing in type 'I'. c = d; d = c; // error ~ -!!! Type 'C' is not assignable to type 'D': -!!! Property 'other' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'D': +!!! error TS2322: Property 'other' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt index 54d0ebef980..71b8b656db4 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt @@ -1,3 +1,13 @@ +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(10,7): error TS2416: Class 'D' incorrectly extends base class 'C': + Private property 'x' cannot be reimplemented. +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(10,7): error TS2421: Class 'D' incorrectly implements interface 'I': + Private property 'x' cannot be reimplemented. +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(18,7): error TS2416: Class 'D2' incorrectly extends base class 'C': + Private property 'x' cannot be reimplemented. +tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(18,7): error TS2421: Class 'D2' incorrectly implements interface 'I': + Private property 'x' cannot be reimplemented. + + ==== tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts (4 errors) ==== class C { public foo(x: any) { return x; } @@ -10,11 +20,11 @@ class D extends C implements I { // error ~ -!!! Class 'D' incorrectly extends base class 'C': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'D' incorrectly extends base class 'C': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~ -!!! Class 'D' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'D' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. public foo(x: any) { return x; } private x = 2; private y = 3; @@ -24,11 +34,11 @@ class D2 extends C implements I { // error ~~ -!!! Class 'D2' incorrectly extends base class 'C': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'D2' incorrectly extends base class 'C': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~ -!!! Class 'D2' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'D2' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. public foo(x: any) { return x; } private x = ""; other(x: any) { return x; } diff --git a/tests/baselines/reference/interfaceImplementation1.errors.txt b/tests/baselines/reference/interfaceImplementation1.errors.txt index f278e160227..e0a6b311d08 100644 --- a/tests/baselines/reference/interfaceImplementation1.errors.txt +++ b/tests/baselines/reference/interfaceImplementation1.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2421: Class 'C1' incorrectly implements interface 'I1': + Private property 'iObj' cannot be reimplemented. +tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2421: Class 'C1' incorrectly implements interface 'I2': + Private property 'iFn' cannot be reimplemented. +tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2323: Type '() => C2' is not assignable to type 'I4'. + + ==== tests/cases/compiler/interfaceImplementation1.ts (3 errors) ==== interface I1 { iObj:{ }; @@ -12,11 +19,11 @@ class C1 implements I1,I2 { ~~ -!!! Class 'C1' incorrectly implements interface 'I1': -!!! Private property 'iObj' cannot be reimplemented. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': +!!! error TS2421: Private property 'iObj' cannot be reimplemented. ~~ -!!! Class 'C1' incorrectly implements interface 'I2': -!!! Private property 'iFn' cannot be reimplemented. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I2': +!!! error TS2421: Private property 'iFn' cannot be reimplemented. private iFn(); private iFn(n?:number, s?:string) { } private iAny:any; @@ -40,7 +47,7 @@ var a:I4 = function(){ ~ -!!! Type '() => C2' is not assignable to type 'I4'. +!!! error TS2323: Type '() => C2' is not assignable to type 'I4'. return new C2(); } new a(); diff --git a/tests/baselines/reference/interfaceImplementation2.errors.txt b/tests/baselines/reference/interfaceImplementation2.errors.txt index 3e050e9b056..d723549d8be 100644 --- a/tests/baselines/reference/interfaceImplementation2.errors.txt +++ b/tests/baselines/reference/interfaceImplementation2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/interfaceImplementation2.ts(8,7): error TS2421: Class 'C3' incorrectly implements interface 'I1': + Property 'iFn' is missing in type 'C3'. + + ==== tests/cases/compiler/interfaceImplementation2.ts (1 errors) ==== interface I1 { iObj:{ }; @@ -8,8 +12,8 @@ class C3 implements I1 { ~~ -!!! Class 'C3' incorrectly implements interface 'I1': -!!! Property 'iFn' is missing in type 'C3'. +!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': +!!! error TS2421: Property 'iFn' is missing in type 'C3'. public iObj:{ }; public iNum:number; public iAny:any; diff --git a/tests/baselines/reference/interfaceImplementation3.errors.txt b/tests/baselines/reference/interfaceImplementation3.errors.txt index b89b58fc379..1e5073ac2ee 100644 --- a/tests/baselines/reference/interfaceImplementation3.errors.txt +++ b/tests/baselines/reference/interfaceImplementation3.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/interfaceImplementation3.ts(8,7): error TS2421: Class 'C4' incorrectly implements interface 'I1': + Property 'iAny' is missing in type 'C4'. + + ==== tests/cases/compiler/interfaceImplementation3.ts (1 errors) ==== interface I1 { iObj:{ }; @@ -8,8 +12,8 @@ class C4 implements I1 { ~~ -!!! Class 'C4' incorrectly implements interface 'I1': -!!! Property 'iAny' is missing in type 'C4'. +!!! error TS2421: Class 'C4' incorrectly implements interface 'I1': +!!! error TS2421: Property 'iAny' is missing in type 'C4'. public iObj:{ }; public iNum:number; public iFn() { } diff --git a/tests/baselines/reference/interfaceImplementation4.errors.txt b/tests/baselines/reference/interfaceImplementation4.errors.txt index e2af897853d..8a08026b0bb 100644 --- a/tests/baselines/reference/interfaceImplementation4.errors.txt +++ b/tests/baselines/reference/interfaceImplementation4.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/interfaceImplementation4.ts(8,7): error TS2421: Class 'C5' incorrectly implements interface 'I1': + Property 'iObj' is missing in type 'C5'. + + ==== tests/cases/compiler/interfaceImplementation4.ts (1 errors) ==== interface I1 { iObj:{ }; @@ -8,8 +12,8 @@ class C5 implements I1 { ~~ -!!! Class 'C5' incorrectly implements interface 'I1': -!!! Property 'iObj' is missing in type 'C5'. +!!! error TS2421: Class 'C5' incorrectly implements interface 'I1': +!!! error TS2421: Property 'iObj' is missing in type 'C5'. public iNum:number; public iAny:any; public iFn() { } diff --git a/tests/baselines/reference/interfaceImplementation5.errors.txt b/tests/baselines/reference/interfaceImplementation5.errors.txt index de49d201e68..882d8516121 100644 --- a/tests/baselines/reference/interfaceImplementation5.errors.txt +++ b/tests/baselines/reference/interfaceImplementation5.errors.txt @@ -1,3 +1,13 @@ +tests/cases/compiler/interfaceImplementation5.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/interfaceImplementation5.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/interfaceImplementation5.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/interfaceImplementation5.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/interfaceImplementation5.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/interfaceImplementation5.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/interfaceImplementation5.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/interfaceImplementation5.ts (8 errors) ==== interface I1 { getset1:number; @@ -6,43 +16,43 @@ class C1 implements I1 { public get getset1(){return 1;} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C2 implements I1 { public set getset1(baz:number){} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C3 implements I1 { public get getset1(){return 1;} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set getset1(baz:number){} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C4 implements I1 { public get getset1(){var x:any; return x;} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C5 implements I1 { public set getset1(baz:any){} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C6 implements I1 { public set getset1(baz:any){} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get getset1(){var x:any; return x;} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceImplementation6.errors.txt b/tests/baselines/reference/interfaceImplementation6.errors.txt index a935fa60c7d..b076f30a223 100644 --- a/tests/baselines/reference/interfaceImplementation6.errors.txt +++ b/tests/baselines/reference/interfaceImplementation6.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/interfaceImplementation6.ts(9,7): error TS2421: Class 'C2' incorrectly implements interface 'I1': + Private property 'item' cannot be reimplemented. +tests/cases/compiler/interfaceImplementation6.ts(13,7): error TS2421: Class 'C3' incorrectly implements interface 'I1': + Property 'item' is missing in type 'C3'. + + ==== tests/cases/compiler/interfaceImplementation6.ts (2 errors) ==== interface I1 { item:number; @@ -9,15 +15,15 @@ class C2 implements I1 { ~~ -!!! Class 'C2' incorrectly implements interface 'I1': -!!! Private property 'item' cannot be reimplemented. +!!! error TS2421: Class 'C2' incorrectly implements interface 'I1': +!!! error TS2421: Private property 'item' cannot be reimplemented. private item:number; } class C3 implements I1 { ~~ -!!! Class 'C3' incorrectly implements interface 'I1': -!!! Property 'item' is missing in type 'C3'. +!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': +!!! error TS2421: Property 'item' is missing in type 'C3'. constructor() { var item: number; } diff --git a/tests/baselines/reference/interfaceImplementation7.errors.txt b/tests/baselines/reference/interfaceImplementation7.errors.txt index c39158df66c..9e04892215d 100644 --- a/tests/baselines/reference/interfaceImplementation7.errors.txt +++ b/tests/baselines/reference/interfaceImplementation7.errors.txt @@ -1,20 +1,29 @@ +tests/cases/compiler/interfaceImplementation7.ts(4,11): error TS2320: Interface 'i3' cannot simultaneously extend types 'i1' and 'i2': + Named properties 'name' of types 'i1' and 'i2' are not identical. +tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2421: Class 'C1' incorrectly implements interface 'i4': + Types of property 'name' are incompatible: + Type '() => string' is not assignable to type '() => { s: string; n: number; }': + Type 'string' is not assignable to type '{ s: string; n: number; }': + Property 's' is missing in type 'String'. + + ==== tests/cases/compiler/interfaceImplementation7.ts (2 errors) ==== interface i1{ name(): { s: string; }; } interface i2{ name(): { n: number; }; } interface i3 extends i1, i2 { } ~~ -!!! Interface 'i3' cannot simultaneously extend types 'i1' and 'i2': -!!! Named properties 'name' of types 'i1' and 'i2' are not identical. +!!! error TS2320: Interface 'i3' cannot simultaneously extend types 'i1' and 'i2': +!!! error TS2320: Named properties 'name' of types 'i1' and 'i2' are not identical. interface i4 extends i1, i2 { name(): { s: string; n: number; }; } class C1 implements i4 { ~~ -!!! Class 'C1' incorrectly implements interface 'i4': -!!! Types of property 'name' are incompatible: -!!! Type '() => string' is not assignable to type '() => { s: string; n: number; }': -!!! Type 'string' is not assignable to type '{ s: string; n: number; }': -!!! Property 's' is missing in type 'String'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'i4': +!!! error TS2421: Types of property 'name' are incompatible: +!!! error TS2421: Type '() => string' is not assignable to type '() => { s: string; n: number; }': +!!! error TS2421: Type 'string' is not assignable to type '{ s: string; n: number; }': +!!! error TS2421: Property 's' is missing in type 'String'. public name(): string { return ""; } } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceImplementation8.errors.txt b/tests/baselines/reference/interfaceImplementation8.errors.txt index 6218ecd6a5e..1e810caedd7 100644 --- a/tests/baselines/reference/interfaceImplementation8.errors.txt +++ b/tests/baselines/reference/interfaceImplementation8.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/interfaceImplementation8.ts(12,7): error TS2421: Class 'C2' incorrectly implements interface 'i1': + Private property 'name' cannot be reimplemented. +tests/cases/compiler/interfaceImplementation8.ts(21,7): error TS2421: Class 'C5' incorrectly implements interface 'i1': + Private property 'name' cannot be reimplemented. +tests/cases/compiler/interfaceImplementation8.ts(22,7): error TS2421: Class 'C6' incorrectly implements interface 'i1': + Private property 'name' cannot be reimplemented. + + ==== tests/cases/compiler/interfaceImplementation8.ts (3 errors) ==== /* 1 @@ -12,8 +20,8 @@ class C2 implements i1 { ~~ -!!! Class 'C2' incorrectly implements interface 'i1': -!!! Private property 'name' cannot be reimplemented. +!!! error TS2421: Class 'C2' incorrectly implements interface 'i1': +!!! error TS2421: Private property 'name' cannot be reimplemented. private name:string; } @@ -24,12 +32,12 @@ class C4 extends C1 implements i1{ } class C5 extends C2 implements i1{ } ~~ -!!! Class 'C5' incorrectly implements interface 'i1': -!!! Private property 'name' cannot be reimplemented. +!!! error TS2421: Class 'C5' incorrectly implements interface 'i1': +!!! error TS2421: Private property 'name' cannot be reimplemented. class C6 extends C3 implements i1{ } ~~ -!!! Class 'C6' incorrectly implements interface 'i1': -!!! Private property 'name' cannot be reimplemented. +!!! error TS2421: Class 'C6' incorrectly implements interface 'i1': +!!! error TS2421: Private property 'name' cannot be reimplemented. /* 2 diff --git a/tests/baselines/reference/interfaceInheritance.errors.txt b/tests/baselines/reference/interfaceInheritance.errors.txt index f8ef8d0861e..e192d0fa2e9 100644 --- a/tests/baselines/reference/interfaceInheritance.errors.txt +++ b/tests/baselines/reference/interfaceInheritance.errors.txt @@ -1,3 +1,15 @@ +tests/cases/compiler/interfaceInheritance.ts(22,7): error TS2421: Class 'C1' incorrectly implements interface 'I2': + Property 'i1P1' is missing in type 'C1'. +tests/cases/compiler/interfaceInheritance.ts(30,1): error TS2322: Type 'I3' is not assignable to type 'I2': + Property 'i1P1' is missing in type 'I3'. +tests/cases/compiler/interfaceInheritance.ts(37,1): error TS2322: Type 'I5' is not assignable to type 'I4': + Types of property 'one' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2322: Type 'I4' is not assignable to type 'I5': + Types of property 'one' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/interfaceInheritance.ts (4 errors) ==== interface I1 { i1P1: number; @@ -22,8 +34,8 @@ class C1 implements I2 { // should be an error - it doesn't implement the members of I1 ~~ -!!! Class 'C1' incorrectly implements interface 'I2': -!!! Property 'i1P1' is missing in type 'C1'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I2': +!!! error TS2421: Property 'i1P1' is missing in type 'C1'. public i2P1: string; } @@ -33,8 +45,8 @@ i1 = i2; i2 = i3; // should be an error - i3 does not implement the members of i1 ~~ -!!! Type 'I3' is not assignable to type 'I2': -!!! Property 'i1P1' is missing in type 'I3'. +!!! error TS2322: Type 'I3' is not assignable to type 'I2': +!!! error TS2322: Property 'i1P1' is missing in type 'I3'. var c1: C1; @@ -43,13 +55,13 @@ i4 = i5; // should be an error ~~ -!!! Type 'I5' is not assignable to type 'I4': -!!! Types of property 'one' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'I5' is not assignable to type 'I4': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. i5 = i4; // should be an error ~~ -!!! Type 'I4' is not assignable to type 'I5': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I4' is not assignable to type 'I5': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceMayNotBeExtendedWitACall.errors.txt b/tests/baselines/reference/interfaceMayNotBeExtendedWitACall.errors.txt index a1644c4a282..06abf0987d6 100644 --- a/tests/baselines/reference/interfaceMayNotBeExtendedWitACall.errors.txt +++ b/tests/baselines/reference/interfaceMayNotBeExtendedWitACall.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/interfaceMayNotBeExtendedWitACall.ts(3,29): error TS1005: ',' expected. +tests/cases/compiler/interfaceMayNotBeExtendedWitACall.ts(3,32): error TS1005: '=>' expected. + + ==== tests/cases/compiler/interfaceMayNotBeExtendedWitACall.ts (2 errors) ==== interface color {} interface blue extends color() { // error ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceMemberValidation.errors.txt b/tests/baselines/reference/interfaceMemberValidation.errors.txt index c6ce933777c..ed8b119bbdd 100644 --- a/tests/baselines/reference/interfaceMemberValidation.errors.txt +++ b/tests/baselines/reference/interfaceMemberValidation.errors.txt @@ -1,20 +1,27 @@ +tests/cases/compiler/interfaceMemberValidation.ts(2,11): error TS2429: Interface 'i2' incorrectly extends interface 'i1': + Types of property 'name' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/interfaceMemberValidation.ts(5,2): error TS2411: Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'. +tests/cases/compiler/interfaceMemberValidation.ts(10,2): error TS2374: Duplicate string index signature. + + ==== tests/cases/compiler/interfaceMemberValidation.ts (3 errors) ==== interface i1 { name: string; } interface i2 extends i1 { name: number; yo: string; } ~~ -!!! Interface 'i2' incorrectly extends interface 'i1': -!!! Types of property 'name' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'i2' incorrectly extends interface 'i1': +!!! error TS2429: Types of property 'name' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. interface foo { bar():any; ~~~~~~~~~~ -!!! Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'. +!!! error TS2411: Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'. bar():any; new():void; new():void; [s:string]:number; [s:string]:number; ~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt b/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt index 055940a5e2e..4be4d858d7b 100644 --- a/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt +++ b/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/interfaceNameAsIdentifier.ts(4,1): error TS2304: Cannot find name 'C'. +tests/cases/compiler/interfaceNameAsIdentifier.ts(12,1): error TS2304: Cannot find name 'm2'. + + ==== tests/cases/compiler/interfaceNameAsIdentifier.ts (2 errors) ==== interface C { (): void; } C(); ~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. module m2 { export interface C { @@ -14,5 +18,5 @@ m2.C(); ~~ -!!! Cannot find name 'm2'. +!!! error TS2304: Cannot find name 'm2'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceNaming1.errors.txt b/tests/baselines/reference/interfaceNaming1.errors.txt index 8f341f0e4ce..67158ce6109 100644 --- a/tests/baselines/reference/interfaceNaming1.errors.txt +++ b/tests/baselines/reference/interfaceNaming1.errors.txt @@ -1,13 +1,19 @@ +tests/cases/compiler/interfaceNaming1.ts(1,11): error TS1005: ';' expected. +tests/cases/compiler/interfaceNaming1.ts(1,1): error TS2304: Cannot find name 'interface'. +tests/cases/compiler/interfaceNaming1.ts(3,1): error TS2304: Cannot find name 'interface'. +tests/cases/compiler/interfaceNaming1.ts(3,13): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/interfaceNaming1.ts (4 errors) ==== interface { } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~ -!!! Cannot find name 'interface'. +!!! error TS2304: Cannot find name 'interface'. interface interface{ } interface & { } ~~~~~~~~~ -!!! Cannot find name 'interface'. +!!! error TS2304: Cannot find name 'interface'. ~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt b/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt index bf5dead7037..82d4a755d2a 100644 --- a/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt +++ b/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/interfacePropertiesWithSameName2.ts(10,11): error TS2320: Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker': + Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. +tests/cases/compiler/interfacePropertiesWithSameName2.ts(26,11): error TS2320: Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker': + Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. + + ==== tests/cases/compiler/interfacePropertiesWithSameName2.ts (2 errors) ==== interface Mover { move(): void; @@ -10,8 +16,8 @@ interface MoverShaker extends Mover, Shaker { ~~~~~~~~~~~ -!!! Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker': -!!! Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. +!!! error TS2320: Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker': +!!! error TS2320: Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. } @@ -29,8 +35,8 @@ interface MoverShaker2 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { } // error ~~~~~~~~~~~~ -!!! Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker': -!!! Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. +!!! error TS2320: Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker': +!!! error TS2320: Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. interface MoverShaker3 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { getStatus(): { speed: number; frequency: number; }; // ok because this getStatus overrides the conflicting ones above diff --git a/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt b/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt index 92a1f5782d1..136a2460b5e 100644 --- a/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt +++ b/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt @@ -1,15 +1,21 @@ +tests/cases/compiler/interfacePropertiesWithSameName3.ts(3,11): error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D': + Named properties 'a' of types 'E' and 'D' are not identical. +tests/cases/compiler/interfacePropertiesWithSameName3.ts(7,11): error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2': + Named properties 'a' of types 'E2' and 'D2' are not identical. + + ==== tests/cases/compiler/interfacePropertiesWithSameName3.ts (2 errors) ==== interface D { a: number; } interface E { a: string; } interface F extends E, D { } // error ~ -!!! Interface 'F' cannot simultaneously extend types 'E' and 'D': -!!! Named properties 'a' of types 'E' and 'D' are not identical. +!!! error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D': +!!! error TS2320: Named properties 'a' of types 'E' and 'D' are not identical. class D2 { a: number; } class E2 { a: string; } interface F2 extends E2, D2 { } // error ~~ -!!! Interface 'F2' cannot simultaneously extend types 'E2' and 'D2': -!!! Named properties 'a' of types 'E2' and 'D2' are not identical. +!!! error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2': +!!! error TS2320: Named properties 'a' of types 'E2' and 'D2' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt b/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt index 456ed18e007..dafff4336ba 100644 --- a/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt +++ b/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts(5,11): error TS2429: Interface 'Derived' incorrectly extends interface 'Base': + Types of property 'x' are incompatible: + Type '{ a: string; }' is not assignable to type '{ a: number; }': + Types of property 'a' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts (1 errors) ==== interface Base { x: { a: number }; @@ -5,11 +12,11 @@ interface Derived extends Base { // error ~~~~~~~ -!!! Interface 'Derived' incorrectly extends interface 'Base': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: string; }' is not assignable to type '{ a: number; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'Derived' incorrectly extends interface 'Base': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: string; }' is not assignable to type '{ a: number; }': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type 'string' is not assignable to type 'number'. x: { a: string; }; diff --git a/tests/baselines/reference/interfaceThatIndirectlyInheritsFromItself.errors.txt b/tests/baselines/reference/interfaceThatIndirectlyInheritsFromItself.errors.txt index d13ee9de95e..3749cae8682 100644 --- a/tests/baselines/reference/interfaceThatIndirectlyInheritsFromItself.errors.txt +++ b/tests/baselines/reference/interfaceThatIndirectlyInheritsFromItself.errors.txt @@ -1,7 +1,11 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts(1,11): error TS2310: Type 'Base' recursively references itself as a base type. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts(14,15): error TS2310: Type 'Base' recursively references itself as a base type. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts (2 errors) ==== interface Base extends Derived2 { // error ~~~~ -!!! Type 'Base' recursively references itself as a base type. +!!! error TS2310: Type 'Base' recursively references itself as a base type. x: string; } @@ -16,7 +20,7 @@ module Generic { interface Base extends Derived2 { // error ~~~~ -!!! Type 'Base' recursively references itself as a base type. +!!! error TS2310: Type 'Base' recursively references itself as a base type. x: string; } diff --git a/tests/baselines/reference/interfaceThatInheritsFromItself.errors.txt b/tests/baselines/reference/interfaceThatInheritsFromItself.errors.txt index b88f09304af..7aa5cc04a87 100644 --- a/tests/baselines/reference/interfaceThatInheritsFromItself.errors.txt +++ b/tests/baselines/reference/interfaceThatInheritsFromItself.errors.txt @@ -1,30 +1,40 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts(10,15): error TS1005: '{' expected. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts(10,26): error TS1005: ';' expected. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts(10,30): error TS1005: ';' expected. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts(1,11): error TS2310: Type 'Foo' recursively references itself as a base type. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts(4,11): error TS2310: Type 'Foo2' recursively references itself as a base type. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts(7,11): error TS2310: Type 'Foo3' recursively references itself as a base type. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts(10,15): error TS2304: Cannot find name 'implements'. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts(10,26): error TS2304: Cannot find name 'Bar'. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts (8 errors) ==== interface Foo extends Foo { // error ~~~ -!!! Type 'Foo' recursively references itself as a base type. +!!! error TS2310: Type 'Foo' recursively references itself as a base type. } interface Foo2 extends Foo2 { // error ~~~~ -!!! Type 'Foo2' recursively references itself as a base type. +!!! error TS2310: Type 'Foo2' recursively references itself as a base type. } interface Foo3 extends Foo3 { // error ~~~~ -!!! Type 'Foo3' recursively references itself as a base type. +!!! error TS2310: Type 'Foo3' recursively references itself as a base type. } interface Bar implements Bar { // error ~~~~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~~ -!!! Cannot find name 'implements'. +!!! error TS2304: Cannot find name 'implements'. ~~~ -!!! Cannot find name 'Bar'. +!!! error TS2304: Cannot find name 'Bar'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithImplements1.errors.txt b/tests/baselines/reference/interfaceWithImplements1.errors.txt index b2b1fdc3954..bb9465712d8 100644 --- a/tests/baselines/reference/interfaceWithImplements1.errors.txt +++ b/tests/baselines/reference/interfaceWithImplements1.errors.txt @@ -1,15 +1,22 @@ +tests/cases/compiler/interfaceWithImplements1.ts(3,16): error TS1005: '{' expected. +tests/cases/compiler/interfaceWithImplements1.ts(3,27): error TS1005: ';' expected. +tests/cases/compiler/interfaceWithImplements1.ts(3,32): error TS1005: ';' expected. +tests/cases/compiler/interfaceWithImplements1.ts(3,16): error TS2304: Cannot find name 'implements'. +tests/cases/compiler/interfaceWithImplements1.ts(3,27): error TS2304: Cannot find name 'IFoo'. + + ==== tests/cases/compiler/interfaceWithImplements1.ts (5 errors) ==== interface IFoo { } interface IBar implements IFoo { ~~~~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~~ -!!! Cannot find name 'implements'. +!!! error TS2304: Cannot find name 'implements'. ~~~~ -!!! Cannot find name 'IFoo'. +!!! error TS2304: Cannot find name 'IFoo'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt b/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt index d96a8d33a63..85351b191ec 100644 --- a/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt @@ -1,3 +1,30 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(21,11): error TS2429: Interface 'Derived2' incorrectly extends interface 'Base2': + Types of property 'x' are incompatible: + Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }': + Types of property 'b' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(52,15): error TS2320: Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2': + Named properties 'x' of types 'Base1' and 'Base2' are not identical. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(54,15): error TS2429: Interface 'Derived4' incorrectly extends interface 'Base1': + Types of property 'x' are incompatible: + Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }': + Types of property 'a' are incompatible: + Type 'T' is not assignable to type 'number'. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(54,15): error TS2429: Interface 'Derived4' incorrectly extends interface 'Base2': + Types of property 'x' are incompatible: + Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }': + Types of property 'b' are incompatible: + Type 'T' is not assignable to type 'number'. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(60,15): error TS2429: Interface 'Derived5' incorrectly extends interface 'Base1': + Types of property 'x' are incompatible: + Type 'T' is not assignable to type '{ a: T; }': + Property 'a' is missing in type '{}'. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts(60,15): error TS2429: Interface 'Derived5' incorrectly extends interface 'Base2': + Types of property 'x' are incompatible: + Type 'T' is not assignable to type '{ b: T; }': + Property 'b' is missing in type '{}'. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts (6 errors) ==== // an interface may have multiple bases with properties of the same name as long as the interface's implementation satisfies all base type versions @@ -21,11 +48,11 @@ interface Derived2 extends Base1, Base2 { // error ~~~~~~~~ -!!! Interface 'Derived2' incorrectly extends interface 'Base2': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }': -!!! Types of property 'b' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'Derived2' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }': +!!! error TS2429: Types of property 'b' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. x: { a: string; b: number; } @@ -58,22 +85,22 @@ interface Derived3 extends Base1, Base2 { } // error ~~~~~~~~ -!!! Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2': -!!! Named properties 'x' of types 'Base1' and 'Base2' are not identical. +!!! error TS2320: Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2': +!!! error TS2320: Named properties 'x' of types 'Base1' and 'Base2' are not identical. interface Derived4 extends Base1, Base2 { // error ~~~~~~~~ -!!! Interface 'Derived4' incorrectly extends interface 'Base1': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }': -!!! Types of property 'a' are incompatible: -!!! Type 'T' is not assignable to type 'number'. +!!! error TS2429: Interface 'Derived4' incorrectly extends interface 'Base1': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type 'number'. ~~~~~~~~ -!!! Interface 'Derived4' incorrectly extends interface 'Base2': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }': -!!! Types of property 'b' are incompatible: -!!! Type 'T' is not assignable to type 'number'. +!!! error TS2429: Interface 'Derived4' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }': +!!! error TS2429: Types of property 'b' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type 'number'. x: { a: T; b: T; } @@ -81,15 +108,15 @@ interface Derived5 extends Base1, Base2 { // error ~~~~~~~~ -!!! Interface 'Derived5' incorrectly extends interface 'Base1': -!!! Types of property 'x' are incompatible: -!!! Type 'T' is not assignable to type '{ a: T; }': -!!! Property 'a' is missing in type '{}'. +!!! error TS2429: Interface 'Derived5' incorrectly extends interface 'Base1': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type '{ a: T; }': +!!! error TS2429: Property 'a' is missing in type '{}'. ~~~~~~~~ -!!! Interface 'Derived5' incorrectly extends interface 'Base2': -!!! Types of property 'x' are incompatible: -!!! Type 'T' is not assignable to type '{ b: T; }': -!!! Property 'b' is missing in type '{}'. +!!! error TS2429: Interface 'Derived5' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type '{ b: T; }': +!!! error TS2429: Property 'b' is missing in type '{}'. x: T; } } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt b/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt index 1ade49844d0..9d60afede0a 100644 --- a/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts(17,11): error TS2429: Interface 'Derived2' incorrectly extends interface 'Base': + Types of property 'x' are incompatible: + Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }': + Types of property 'a' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts (1 errors) ==== interface Base { x: { @@ -17,11 +24,11 @@ interface Derived2 extends Base, Base2 { // error ~~~~~~~~ -!!! Interface 'Derived2' incorrectly extends interface 'Base': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }': -!!! Types of property 'a' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'Derived2' incorrectly extends interface 'Base': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. x: { a: number; b: string } } diff --git a/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt b/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt index 0297e7966f5..9afd0d37733 100644 --- a/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt @@ -1,68 +1,85 @@ +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(3,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(5,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(5,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(7,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(9,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(9,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(11,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(16,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(18,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(20,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(22,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(24,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(29,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(34,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(36,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/interfaceWithMultipleDeclarations.ts (15 errors) ==== interface I1 { } interface I1 { // Name mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I1 { // Length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I1 { // constraint present ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I1 { // Length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I1 { // Length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { } interface I2 string> { // constraint mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { // constraint absent ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { // name mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { // length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { // length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I3 { } interface I3 { // length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } class Foo { } interface I4> { ~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I4> { // Should not be error ~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPrivateMember.errors.txt b/tests/baselines/reference/interfaceWithPrivateMember.errors.txt index b0c2e9fcfd2..e019ff9d9a1 100644 --- a/tests/baselines/reference/interfaceWithPrivateMember.errors.txt +++ b/tests/baselines/reference/interfaceWithPrivateMember.errors.txt @@ -1,24 +1,31 @@ +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(13,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(12,16): error TS2304: Cannot find name 'string'. + + ==== tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts (5 errors) ==== // interfaces do not permit private members, these are errors interface I { private x: string; ~~~~~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } interface I2 { private y: T; ~~~~~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } var x: { private y: string; ~~~~~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt index 543e7fc9ce8..66043dc6f7e 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts(5,11): error TS2429: Interface 'Foo' incorrectly extends interface 'Base': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts(13,11): error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': + Private property 'x' cannot be reimplemented. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts (2 errors) ==== class Base { private x: number; @@ -5,8 +11,8 @@ interface Foo extends Base { // error ~~~ -!!! Interface 'Foo' incorrectly extends interface 'Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'Foo' incorrectly extends interface 'Base': +!!! error TS2429: Private property 'x' cannot be reimplemented. x: number; } @@ -16,7 +22,7 @@ interface Foo2 extends Base2 { // error ~~~~ -!!! Interface 'Foo2' incorrectly extends interface 'Base2': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': +!!! error TS2429: Private property 'x' cannot be reimplemented. x: number; } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt index f056d65fe16..3f4be2ebac7 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts(5,11): error TS2429: Interface 'Foo' incorrectly extends interface 'Base': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts(13,11): error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': + Private property 'x' cannot be reimplemented. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts (2 errors) ==== class Base { private x() {} @@ -5,8 +11,8 @@ interface Foo extends Base { // error ~~~ -!!! Interface 'Foo' incorrectly extends interface 'Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'Foo' incorrectly extends interface 'Base': +!!! error TS2429: Private property 'x' cannot be reimplemented. x(): any; } @@ -16,7 +22,7 @@ interface Foo2 extends Base2 { // error ~~~~ -!!! Interface 'Foo2' incorrectly extends interface 'Base2': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': +!!! error TS2429: Private property 'x' cannot be reimplemented. x(): any; } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer.errors.txt b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer.errors.txt index b93e0479e10..40dc5668eb2 100644 --- a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer.errors.txt +++ b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer.ts(13,5): error TS2411: Property 'y' of type '{ a: number; }' is not assignable to string index type '{ a: number; b: number; }'. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer.ts (1 errors) ==== interface Base { [x: string]: { a: number } @@ -17,5 +20,5 @@ ~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! Property 'y' of type '{ a: number; }' is not assignable to string index type '{ a: number; b: number; }'. +!!! error TS2411: Property 'y' of type '{ a: number; }' is not assignable to string index type '{ a: number; b: number; }'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer2.errors.txt b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer2.errors.txt index 965cba84565..ac66d08a83a 100644 --- a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer2.errors.txt +++ b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer2.ts(17,5): error TS2412: Property '1' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer2.ts (1 errors) ==== interface Base { [x: number]: { a: number; b: number } @@ -21,5 +24,5 @@ ~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! Property '1' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. +!!! error TS2412: Property '1' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer3.errors.txt b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer3.errors.txt index 080ffc7fb76..932780aaa1a 100644 --- a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer3.errors.txt +++ b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer3.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer3.ts(13,5): error TS2412: Property '2' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer3.ts (1 errors) ==== interface Base { [x: number]: { a: number } @@ -17,5 +20,5 @@ ~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! Property '2' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. +!!! error TS2412: Property '2' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfacedeclWithIndexerErrors.errors.txt b/tests/baselines/reference/interfacedeclWithIndexerErrors.errors.txt index 118e4c20911..3eff7ad420c 100644 --- a/tests/baselines/reference/interfacedeclWithIndexerErrors.errors.txt +++ b/tests/baselines/reference/interfacedeclWithIndexerErrors.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/interfacedeclWithIndexerErrors.ts(12,5): error TS2411: Property 'p2' of type 'string' is not assignable to string index type '() => string'. +tests/cases/compiler/interfacedeclWithIndexerErrors.ts(14,5): error TS2411: Property 'p4' of type 'number' is not assignable to string index type '() => string'. +tests/cases/compiler/interfacedeclWithIndexerErrors.ts(15,5): error TS2411: Property 'p5' of type '(s: number) => string' is not assignable to string index type '() => string'. +tests/cases/compiler/interfacedeclWithIndexerErrors.ts(19,5): error TS2411: Property 'f3' of type '(a: string) => number' is not assignable to string index type '() => string'. +tests/cases/compiler/interfacedeclWithIndexerErrors.ts(20,5): error TS2411: Property 'f4' of type '(s: number) => string' is not assignable to string index type '() => string'. + + ==== tests/cases/compiler/interfacedeclWithIndexerErrors.ts (5 errors) ==== interface a0 { (): string; @@ -12,23 +19,23 @@ p1; p2: string; ~~~~~~~~~~~ -!!! Property 'p2' of type 'string' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'p2' of type 'string' is not assignable to string index type '() => string'. p3?; p4?: number; ~~~~~~~~~~~~ -!!! Property 'p4' of type 'number' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'p4' of type 'number' is not assignable to string index type '() => string'. p5: (s: number) =>string; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'p5' of type '(s: number) => string' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'p5' of type '(s: number) => string' is not assignable to string index type '() => string'. f1(); f2? (); f3(a: string): number; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'f3' of type '(a: string) => number' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'f3' of type '(a: string) => number' is not assignable to string index type '() => string'. f4? (s: number): string; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'f4' of type '(s: number) => string' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'f4' of type '(s: number) => string' is not assignable to string index type '() => string'. } diff --git a/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt b/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt index 5daed96e71f..20ef6f7a39d 100644 --- a/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt +++ b/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt @@ -1,16 +1,23 @@ +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(5,11): error TS1003: Identifier expected. +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(1,11): error TS2427: Interface name cannot be 'any' +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(2,11): error TS2427: Interface name cannot be 'number' +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(3,11): error TS2427: Interface name cannot be 'string' +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(4,11): error TS2427: Interface name cannot be 'boolean' + + ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts (5 errors) ==== interface any { } ~~~ -!!! Interface name cannot be 'any' +!!! error TS2427: Interface name cannot be 'any' interface number { } ~~~~~~ -!!! Interface name cannot be 'number' +!!! error TS2427: Interface name cannot be 'number' interface string { } ~~~~~~ -!!! Interface name cannot be 'string' +!!! error TS2427: Interface name cannot be 'string' interface boolean { } ~~~~~~~ -!!! Interface name cannot be 'boolean' +!!! error TS2427: Interface name cannot be 'boolean' interface void {} ~~~~ -!!! Identifier expected. \ No newline at end of file +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt index 88f24934256..ee6a580ef40 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts(17,26): error TS2339: Property 'c' does not exist on type 'typeof m3'. + + ==== tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module x { export class c { @@ -17,4 +20,4 @@ export var d = new m2.m3.c(); ~ -!!! Property 'c' does not exist on type 'typeof m3'. \ No newline at end of file +!!! error TS2339: Property 'c' does not exist on type 'typeof m3'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt index 0c2d7780a14..ff1739be202 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts(14,21): error TS2339: Property 'b' does not exist on type 'typeof c'. + + ==== tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export enum weekend { @@ -14,4 +17,4 @@ var happyFriday = c.b.Friday; ~ -!!! Property 'b' does not exist on type 'typeof c'. \ No newline at end of file +!!! error TS2339: Property 'b' does not exist on type 'typeof c'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt index 3fd6a4f97cf..c28842aee7f 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts(12,11): error TS2339: Property 'b' does not exist on type 'typeof c'. + + ==== tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export function foo(x: number) { @@ -12,4 +15,4 @@ } var d = c.b(11); ~ -!!! Property 'b' does not exist on type 'typeof c'. \ No newline at end of file +!!! error TS2339: Property 'b' does not exist on type 'typeof c'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt index 34496189449..7997eb2b3ae 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts(13,22): error TS2339: Property 'b' does not exist on type 'typeof c'. + + ==== tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export module b { @@ -13,4 +16,4 @@ export var d = new c.b.c(); ~ -!!! Property 'b' does not exist on type 'typeof c'. \ No newline at end of file +!!! error TS2339: Property 'b' does not exist on type 'typeof c'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt index eba8ac44484..9b5bf66844d 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts(11,8): error TS2305: Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. + + ==== tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export interface I { @@ -11,4 +14,4 @@ var x: c.b; ~~~ -!!! Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file +!!! error TS2305: Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt index b8b04cfc224..33bb8f16331 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts(16,15): error TS2305: Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. + + ==== tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export module b { @@ -16,4 +19,4 @@ export var z: c.b.I; ~~~~~ -!!! Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file +!!! error TS2305: Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt index 90723aaa157..6c00ac57794 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts(10,18): error TS2339: Property 'b' does not exist on type 'typeof c'. + + ==== tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export var x = 10; @@ -10,4 +13,4 @@ export var z = c.b; ~ -!!! Property 'b' does not exist on type 'typeof c'. \ No newline at end of file +!!! error TS2339: Property 'b' does not exist on type 'typeof c'. \ No newline at end of file diff --git a/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt index 64d2e92bdd4..1292efd8a08 100644 --- a/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts(11,16): error TS2437: Module 'A' is hidden by a local declaration with the same name + + ==== tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts (1 errors) ==== class A { aProp: string; @@ -11,6 +14,6 @@ var A = 1; import Y = A; ~ -!!! Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name } \ No newline at end of file diff --git a/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt index 3cbb49c6809..5146966c3a4 100644 --- a/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts(8,16): error TS2437: Module 'A' is hidden by a local declaration with the same name + + ==== tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts (1 errors) ==== module A { export interface X { s: string } @@ -8,6 +11,6 @@ var A = 1; import Y = A; ~ -!!! Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name } \ No newline at end of file diff --git a/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt index 3e50f2be298..9f5cba24873 100644 --- a/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts(10,16): error TS2437: Module 'A' is hidden by a local declaration with the same name + + ==== tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts (1 errors) ==== class A { aProp: string; @@ -10,6 +13,6 @@ var A = 1; import Y = A; ~ -!!! Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name } \ No newline at end of file diff --git a/tests/baselines/reference/intrinsics.errors.txt b/tests/baselines/reference/intrinsics.errors.txt index c2ffc5a2fc9..e9529d4b9f0 100644 --- a/tests/baselines/reference/intrinsics.errors.txt +++ b/tests/baselines/reference/intrinsics.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/intrinsics.ts(2,21): error TS2304: Cannot find name 'hasOwnProperty'. +tests/cases/compiler/intrinsics.ts(11,1): error TS2304: Cannot find name '__proto__'. + + ==== tests/cases/compiler/intrinsics.ts (2 errors) ==== var hasOwnProperty: hasOwnProperty; // Error ~~~~~~~~~~~~~~ -!!! Cannot find name 'hasOwnProperty'. +!!! error TS2304: Cannot find name 'hasOwnProperty'. module m1 { export var __proto__; @@ -13,7 +17,7 @@ __proto__ = 0; // Error, __proto__ not defined ~~~~~~~~~ -!!! Cannot find name '__proto__'. +!!! error TS2304: Cannot find name '__proto__'. m1.__proto__ = 0; class Foo<__proto__> { } diff --git a/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt b/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt index a89539e5da3..2d800b4befd 100644 --- a/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt +++ b/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt @@ -1,43 +1,55 @@ +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(2,1): error TS2323: Type 'number' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(3,1): error TS2323: Type 'boolean' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(4,1): error TS2323: Type 'string' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(5,1): error TS2323: Type '{}' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(9,1): error TS2323: Type 'typeof C' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(10,1): error TS2323: Type 'C' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(14,1): error TS2323: Type 'I' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(17,1): error TS2323: Type 'typeof M' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(20,5): error TS2323: Type 'T' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(22,1): error TS2323: Type '(a: T) => void' is not assignable to type 'void'. + + ==== tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts (10 errors) ==== var x: void; x = 1; ~ -!!! Type 'number' is not assignable to type 'void'. +!!! error TS2323: Type 'number' is not assignable to type 'void'. x = true; ~ -!!! Type 'boolean' is not assignable to type 'void'. +!!! error TS2323: Type 'boolean' is not assignable to type 'void'. x = ''; ~ -!!! Type 'string' is not assignable to type 'void'. +!!! error TS2323: Type 'string' is not assignable to type 'void'. x = {} ~ -!!! Type '{}' is not assignable to type 'void'. +!!! error TS2323: Type '{}' is not assignable to type 'void'. class C { foo: string; } var c: C; x = C; ~ -!!! Type 'typeof C' is not assignable to type 'void'. +!!! error TS2323: Type 'typeof C' is not assignable to type 'void'. x = c; ~ -!!! Type 'C' is not assignable to type 'void'. +!!! error TS2323: Type 'C' is not assignable to type 'void'. interface I { foo: string; } var i: I; x = i; ~ -!!! Type 'I' is not assignable to type 'void'. +!!! error TS2323: Type 'I' is not assignable to type 'void'. module M { export var x = 1; } x = M; ~ -!!! Type 'typeof M' is not assignable to type 'void'. +!!! error TS2323: Type 'typeof M' is not assignable to type 'void'. function f(a: T) { x = a; ~ -!!! Type 'T' is not assignable to type 'void'. +!!! error TS2323: Type 'T' is not assignable to type 'void'. } x = f; ~ -!!! Type '(a: T) => void' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2323: Type '(a: T) => void' is not assignable to type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidBooleanAssignments.errors.txt b/tests/baselines/reference/invalidBooleanAssignments.errors.txt index 8da60d2e27a..d7642fa4ace 100644 --- a/tests/baselines/reference/invalidBooleanAssignments.errors.txt +++ b/tests/baselines/reference/invalidBooleanAssignments.errors.txt @@ -1,49 +1,63 @@ +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(3,5): error TS2323: Type 'boolean' is not assignable to type 'number'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(4,5): error TS2323: Type 'boolean' is not assignable to type 'string'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(5,5): error TS2323: Type 'boolean' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(9,5): error TS2323: Type 'boolean' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'C': + Property 'foo' is missing in type 'Boolean'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(15,5): error TS2322: Type 'boolean' is not assignable to type 'I': + Property 'bar' is missing in type 'Boolean'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(17,5): error TS2323: Type 'boolean' is not assignable to type '() => string'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(24,5): error TS2323: Type 'boolean' is not assignable to type 'T'. +tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts (10 errors) ==== var x = true; var a: number = x; ~ -!!! Type 'boolean' is not assignable to type 'number'. +!!! error TS2323: Type 'boolean' is not assignable to type 'number'. var b: string = x; ~ -!!! Type 'boolean' is not assignable to type 'string'. +!!! error TS2323: Type 'boolean' is not assignable to type 'string'. var c: void = x; ~ -!!! Type 'boolean' is not assignable to type 'void'. +!!! error TS2323: Type 'boolean' is not assignable to type 'void'. var d: typeof undefined = x; enum E { A } var e: E = x; ~ -!!! Type 'boolean' is not assignable to type 'E'. +!!! error TS2323: Type 'boolean' is not assignable to type 'E'. class C { foo: string } var f: C = x; ~ -!!! Type 'boolean' is not assignable to type 'C': -!!! Property 'foo' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'C': +!!! error TS2322: Property 'foo' is missing in type 'Boolean'. interface I { bar: string } var g: I = x; ~ -!!! Type 'boolean' is not assignable to type 'I': -!!! Property 'bar' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'I': +!!! error TS2322: Property 'bar' is missing in type 'Boolean'. var h: { (): string } = x; ~ -!!! Type 'boolean' is not assignable to type '() => string'. +!!! error TS2323: Type 'boolean' is not assignable to type '() => string'. var h2: { toString(): string } = x; // no error module M { export var a = 1; } M = x; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function i(a: T) { a = x; ~ -!!! Type 'boolean' is not assignable to type 'T'. +!!! error TS2323: Type 'boolean' is not assignable to type 'T'. } i = x; ~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/invalidConstraint1.errors.txt b/tests/baselines/reference/invalidConstraint1.errors.txt index c38b126504c..bac8f805c0f 100644 --- a/tests/baselines/reference/invalidConstraint1.errors.txt +++ b/tests/baselines/reference/invalidConstraint1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/invalidConstraint1.ts(1,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/invalidConstraint1.ts (1 errors) ==== function f() { ~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return undefined; } f(); // should error diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt index 9b526d3c219..65fd55b763b 100644 --- a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt @@ -1,16 +1,24 @@ +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(8,4): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +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) ==== // All errors // naked break not allowed break; ~~~~~~ -!!! A 'break' statement can only be used within an enclosing iteration or switch statement. +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. // non-existent label ONE: do break TWO; while (true) ~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: @@ -18,7 +26,7 @@ var x = () => { break TWO; ~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } }while (true) @@ -27,7 +35,7 @@ var fn = function () { break THREE; ~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } }while (true) @@ -35,7 +43,7 @@ do { break FIVE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. FIVE: do { } while (true) }while (true) @@ -47,5 +55,5 @@ do { break NINE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. }while (true) \ No newline at end of file diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt index 38c54104d39..e9643394d12 100644 --- a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt @@ -1,16 +1,24 @@ +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(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(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) ==== // All errors // naked continue not allowed continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. // non-existent label ONE: do continue TWO; while (true) ~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: @@ -18,7 +26,7 @@ var x = () => { continue TWO; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } }while (true) @@ -27,7 +35,7 @@ var fn = function () { continue THREE; ~~~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } }while (true) @@ -35,7 +43,7 @@ do { continue FIVE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. FIVE: do { } while (true) }while (true) @@ -47,5 +55,5 @@ do { continue NINE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. }while (true) \ No newline at end of file diff --git a/tests/baselines/reference/invalidEnumAssignments.errors.txt b/tests/baselines/reference/invalidEnumAssignments.errors.txt index cfbc67c3390..6e9c46d4239 100644 --- a/tests/baselines/reference/invalidEnumAssignments.errors.txt +++ b/tests/baselines/reference/invalidEnumAssignments.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(14,1): error TS2323: Type 'E2' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(15,1): error TS2323: Type 'E' is not assignable to type 'E2'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(16,1): error TS2323: Type 'void' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(17,1): error TS2323: Type '{}' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(18,1): error TS2323: Type 'string' is not assignable to type 'E'. +tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(21,5): error TS2323: Type 'T' is not assignable to type 'E'. + + ==== tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts (6 errors) ==== enum E { A, @@ -14,22 +22,22 @@ e = E2.A; ~ -!!! Type 'E2' is not assignable to type 'E'. +!!! error TS2323: Type 'E2' is not assignable to type 'E'. e2 = E.A; ~~ -!!! Type 'E' is not assignable to type 'E2'. +!!! error TS2323: Type 'E' is not assignable to type 'E2'. e = null; ~ -!!! Type 'void' is not assignable to type 'E'. +!!! error TS2323: Type 'void' is not assignable to type 'E'. e = {}; ~ -!!! Type '{}' is not assignable to type 'E'. +!!! error TS2323: Type '{}' is not assignable to type 'E'. e = ''; ~ -!!! Type 'string' is not assignable to type 'E'. +!!! error TS2323: Type 'string' is not assignable to type 'E'. function f(a: T) { e = a; ~ -!!! Type 'T' is not assignable to type 'E'. +!!! error TS2323: Type 'T' is not assignable to type 'E'. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForBreakStatements.errors.txt b/tests/baselines/reference/invalidForBreakStatements.errors.txt index 28c110b1105..50e4013c0ea 100644 --- a/tests/baselines/reference/invalidForBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidForBreakStatements.errors.txt @@ -1,16 +1,24 @@ +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(8,9): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +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) ==== // All errors // naked break not allowed break; ~~~~~~ -!!! A 'break' statement can only be used within an enclosing iteration or switch statement. +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. // non-existent label ONE: for(;;) break TWO; ~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: @@ -18,7 +26,7 @@ var x = () => { break TWO; ~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -27,7 +35,7 @@ var fn = function () { break THREE; ~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -35,7 +43,7 @@ for(;;) { break FIVE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. FIVE: for (; ;) { } } @@ -46,5 +54,5 @@ for(;;) { break NINE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForContinueStatements.errors.txt b/tests/baselines/reference/invalidForContinueStatements.errors.txt index d3aadb0b694..3af47370df1 100644 --- a/tests/baselines/reference/invalidForContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidForContinueStatements.errors.txt @@ -1,16 +1,24 @@ +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(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(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) ==== // All errors // naked continue not allowed continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. // non-existent label ONE: for(;;) continue TWO; ~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: @@ -18,7 +26,7 @@ var x = () => { continue TWO; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -27,7 +35,7 @@ var fn = function () { continue THREE; ~~~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -35,7 +43,7 @@ for(;;) { continue FIVE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. FIVE: for (; ;) { } } @@ -46,5 +54,5 @@ for(;;) { continue NINE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForInBreakStatements.errors.txt b/tests/baselines/reference/invalidForInBreakStatements.errors.txt index 6e29ea04c8e..d83304ab1c6 100644 --- a/tests/baselines/reference/invalidForInBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidForInBreakStatements.errors.txt @@ -1,16 +1,24 @@ +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(8,19): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. +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(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) ==== // All errors // naked break not allowed break; ~~~~~~ -!!! A 'break' statement can only be used within an enclosing iteration or switch statement. +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. // non-existent label ONE: for (var x in {}) break TWO; ~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: @@ -18,7 +26,7 @@ var fn = () => { break TWO; ~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -27,7 +35,7 @@ var fn = function () { break THREE; ~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -35,7 +43,7 @@ for (var x in {}) { break FIVE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. FIVE: for (var x in {}) { } } @@ -47,5 +55,5 @@ for (var x in {}) { break NINE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForInContinueStatements.errors.txt b/tests/baselines/reference/invalidForInContinueStatements.errors.txt index f9cf403c975..7353a22d9cd 100644 --- a/tests/baselines/reference/invalidForInContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidForInContinueStatements.errors.txt @@ -1,16 +1,24 @@ +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(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(14,9): error TS1107: Jump target cannot cross function boundary. +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(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) ==== // All errors // naked continue not allowed continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. // non-existent label ONE: for (var x in {}) continue TWO; ~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: @@ -18,7 +26,7 @@ var fn = () => { continue TWO; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -27,7 +35,7 @@ var fn = function () { continue THREE; ~~~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -35,7 +43,7 @@ for (var x in {}) { continue FIVE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. FIVE: for (var x in {}) { } } @@ -47,5 +55,5 @@ for (var x in {}) { continue NINE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt b/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt index 0248c590eb8..ea582635856 100644 --- a/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt +++ b/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(5,1): error TS2304: Cannot find name 'V'. +tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(11,1): error TS2304: Cannot find name 'C'. +tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(17,1): error TS2304: Cannot find name 'E'. +tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(23,1): error TS2304: Cannot find name 'I'. + + ==== tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts (4 errors) ==== // none of these should work, since non are actually modules @@ -5,7 +11,7 @@ import v = V; ~~~~~~~~~~~~~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. class C { name: string; @@ -13,7 +19,7 @@ import c = C; ~~~~~~~~~~~~~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. enum E { Red, Blue @@ -21,7 +27,7 @@ import e = E; ~~~~~~~~~~~~~ -!!! Cannot find name 'E'. +!!! error TS2304: Cannot find name 'E'. interface I { id: number; @@ -29,5 +35,5 @@ import i = I; ~~~~~~~~~~~~~ -!!! Cannot find name 'I'. +!!! error TS2304: Cannot find name 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidInstantiatedModule.errors.txt b/tests/baselines/reference/invalidInstantiatedModule.errors.txt index ed5ae704038..e6cb5491407 100644 --- a/tests/baselines/reference/invalidInstantiatedModule.errors.txt +++ b/tests/baselines/reference/invalidInstantiatedModule.errors.txt @@ -1,9 +1,13 @@ +tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(3,16): error TS2300: Duplicate identifier 'Point'. +tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(12,8): error TS2304: Cannot find name 'm'. + + ==== tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts (2 errors) ==== module M { export class Point { x: number; y: number } export var Point = 1; // Error ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. } module M2 { @@ -14,7 +18,7 @@ var m = M2; var p: m.Point; // Error ~~~~~~~ -!!! Cannot find name 'm'. +!!! error TS2304: Cannot find name 'm'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.errors.txt b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.errors.txt index a9707aedc84..101ee0124cc 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.errors.txt +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.errors.txt @@ -1,14 +1,37 @@ +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(4,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(6,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(12,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(13,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(15,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(19,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(25,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(29,5): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(31,5): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(37,5): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(38,5): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(40,5): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(44,5): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(50,5): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(55,5): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(57,5): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(63,5): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(64,5): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(66,5): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(70,5): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts(76,5): error TS1044: 'static' modifier cannot appear on a module element. + + ==== tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts (21 errors) ==== // All of these should be an error module Y { public class A { s: string } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. public class BB extends A { ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. id: number; } } @@ -16,20 +39,20 @@ module Y2 { public class AA { s: T } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. public interface I { id: number } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. public class B extends AA implements I { id: number } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. } module Y3 { public module Module { ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. class A { s: string } } } @@ -37,17 +60,17 @@ module Y4 { public enum Color { Blue, Red } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. } module YY { private class A { s: string } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. private class BB extends A { ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. id: number; } } @@ -55,20 +78,20 @@ module YY2 { private class AA { s: T } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. private interface I { id: number } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. private class B extends AA implements I { id: number } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. } module YY3 { private module Module { ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. class A { s: string } } } @@ -76,18 +99,18 @@ module YY4 { private enum Color { Blue, Red } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. } module YYY { static class A { s: string } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. static class BB extends A { ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. id: number; } } @@ -95,20 +118,20 @@ module YYY2 { static class AA { s: T } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. static interface I { id: number } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. static class B extends AA implements I { id: number } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. } module YYY3 { static module Module { ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. class A { s: string } } } @@ -116,6 +139,6 @@ module YYY4 { static enum Color { Blue, Red } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidModuleWithVarStatements.errors.txt b/tests/baselines/reference/invalidModuleWithVarStatements.errors.txt index 80f516a2f66..ad8d457670a 100644 --- a/tests/baselines/reference/invalidModuleWithVarStatements.errors.txt +++ b/tests/baselines/reference/invalidModuleWithVarStatements.errors.txt @@ -1,40 +1,48 @@ +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(4,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(8,5): error TS1044: 'public' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(12,5): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(16,5): error TS1044: 'static' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(20,5): error TS1044: 'private' modifier cannot appear on a module element. +tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(25,5): error TS1044: 'private' modifier cannot appear on a module element. + + ==== tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts (6 errors) ==== // All of these should be an error module Y { public var x: number = 0; ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. } module Y2 { public function fn(x: string) { } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. } module Y4 { static var x: number = 0; ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. } module YY { static function fn(x: string) { } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. } module YY2 { private var x: number = 0; ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. } module YY3 { private function fn(x: string) { } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.errors.txt b/tests/baselines/reference/invalidMultipleVariableDeclarations.errors.txt index b09865a2f25..0a4761994dd 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.errors.txt +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.errors.txt @@ -1,3 +1,17 @@ +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(32,5): 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/VariableStatements/invalidMultipleVariableDeclarations.ts(33,5): 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/VariableStatements/invalidMultipleVariableDeclarations.ts(34,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(35,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(36,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(39,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(40,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(43,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(46,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(47,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(50,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. +tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(53,5): 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/VariableStatements/invalidMultipleVariableDeclarations.ts (12 errors) ==== interface I { id: number; @@ -32,47 +46,47 @@ var a: any; var a = 1; ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. var a = 'a string'; ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. var a = new C(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. var a = new D(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. var a = M; ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. var b: I; var b = new C(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. var b = new C2(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. var f = F; var f = (x: number) => ''; ~ -!!! Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. var arr: string[]; var arr = [1, 2, 3, 4]; ~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. var arr = [new C(), new C2(), new D()]; ~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. var arr2 = [new D()]; var arr2 = new Array>(); ~~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. var m: typeof M; var m = M.A; ~ -!!! Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidNestedModules.errors.txt b/tests/baselines/reference/invalidNestedModules.errors.txt index 31e8ad29177..1d7e2641ff4 100644 --- a/tests/baselines/reference/invalidNestedModules.errors.txt +++ b/tests/baselines/reference/invalidNestedModules.errors.txt @@ -1,7 +1,11 @@ +tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(1,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(24,20): error TS2300: Duplicate identifier 'Point'. + + ==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (2 errors) ==== module A.B.C { ~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged export class Point { x: number; y: number; @@ -26,7 +30,7 @@ export module X { export var Point: number; // Error ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. } } diff --git a/tests/baselines/reference/invalidNumberAssignments.errors.txt b/tests/baselines/reference/invalidNumberAssignments.errors.txt index 4bba247a5b8..641e02683e6 100644 --- a/tests/baselines/reference/invalidNumberAssignments.errors.txt +++ b/tests/baselines/reference/invalidNumberAssignments.errors.txt @@ -1,48 +1,64 @@ +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(3,5): error TS2323: Type 'number' is not assignable to type 'boolean'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(4,5): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(5,5): error TS2323: Type 'number' is not assignable to type 'void'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(9,5): error TS2322: Type 'number' is not assignable to type 'C': + Property 'foo' is missing in type 'Number'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(12,5): error TS2322: Type 'number' is not assignable to type 'I': + Property 'bar' is missing in type 'Number'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }': + Property 'baz' is missing in type 'Number'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }': + Property '0' is missing in type 'Number'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(21,5): error TS2323: Type 'number' is not assignable to type 'T'. +tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts (10 errors) ==== var x = 1; var a: boolean = x; ~ -!!! Type 'number' is not assignable to type 'boolean'. +!!! error TS2323: Type 'number' is not assignable to type 'boolean'. var b: string = x; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var c: void = x; ~ -!!! Type 'number' is not assignable to type 'void'. +!!! error TS2323: Type 'number' is not assignable to type 'void'. var d: typeof undefined = x; class C { foo: string; } var e: C = x; ~ -!!! Type 'number' is not assignable to type 'C': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'C': +!!! error TS2322: Property 'foo' is missing in type 'Number'. interface I { bar: string; } var f: I = x; ~ -!!! Type 'number' is not assignable to type 'I': -!!! Property 'bar' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'I': +!!! error TS2322: Property 'bar' is missing in type 'Number'. var g: { baz: string } = 1; ~ -!!! Type 'number' is not assignable to type '{ baz: string; }': -!!! Property 'baz' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }': +!!! error TS2322: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ -!!! Type 'number' is not assignable to type '{ 0: number; }': -!!! Property '0' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }': +!!! error TS2322: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function i(a: T) { a = x; ~ -!!! Type 'number' is not assignable to type 'T'. +!!! error TS2323: Type 'number' is not assignable to type 'T'. } i = x; ~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/invalidReferenceSyntax1.errors.txt b/tests/baselines/reference/invalidReferenceSyntax1.errors.txt index cad7a35eb02..e7599c7a146 100644 --- a/tests/baselines/reference/invalidReferenceSyntax1.errors.txt +++ b/tests/baselines/reference/invalidReferenceSyntax1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/invalidReferenceSyntax1.ts(1,1): error TS1084: Invalid 'reference' directive syntax. + + ==== tests/cases/compiler/invalidReferenceSyntax1.ts (1 errors) ==== /// ()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. a.length; a.push(new C()); (new C()).prototype; ~~~~~~~~~ -!!! Property 'prototype' does not exist on type 'C'. +!!! error TS2339: Property 'prototype' does not exist on type 'C'. } \ No newline at end of file diff --git a/tests/baselines/reference/lift.errors.txt b/tests/baselines/reference/lift.errors.txt index 56f8a860211..ef8bddbf787 100644 --- a/tests/baselines/reference/lift.errors.txt +++ b/tests/baselines/reference/lift.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/lift.ts(14,32): error TS2304: Cannot find name 'x'. +tests/cases/compiler/lift.ts(14,34): error TS2304: Cannot find name 'z'. +tests/cases/compiler/lift.ts(15,37): error TS2304: Cannot find name 'x'. +tests/cases/compiler/lift.ts(15,39): error TS2304: Cannot find name 'z'. + + ==== tests/cases/compiler/lift.ts (4 errors) ==== class B { constructor(public y:number) { @@ -14,13 +20,13 @@ public liftxyz () { return x+z+this.y; } ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. public liftxylocllz () { return x+z+this.y+this.ll; } ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. } \ No newline at end of file diff --git a/tests/baselines/reference/literals-negative.errors.txt b/tests/baselines/reference/literals-negative.errors.txt index 276afb5a81d..d783e5dfa02 100644 --- a/tests/baselines/reference/literals-negative.errors.txt +++ b/tests/baselines/reference/literals-negative.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/literals-negative.ts(5,9): error TS2352: Neither type 'number' nor type 'boolean' is assignable to the other. + + ==== tests/cases/compiler/literals-negative.ts (1 errors) ==== // Type type of the null literal is the Null type. // Null can be converted to anything except Void @@ -5,7 +8,7 @@ var s = (null); var b = (n); ~~~~~~~~~~~~ -!!! Neither type 'number' nor type 'boolean' is assignable to the other. +!!! error TS2352: Neither type 'number' nor type 'boolean' is assignable to the other. function isVoid() : void { } diff --git a/tests/baselines/reference/literals.errors.txt b/tests/baselines/reference/literals.errors.txt index 3361dfd5c67..f33d26af7a4 100644 --- a/tests/baselines/reference/literals.errors.txt +++ b/tests/baselines/reference/literals.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/expressions/literals/literals.ts(20,9): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/literals/literals.ts(25,10): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/literals/literals.ts(9,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/literals/literals.ts(9,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/literals/literals.ts(10,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/literals/literals.ts(10,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/literals/literals.ts (6 errors) ==== //typeof null is Null @@ -9,14 +17,14 @@ var nu = null / null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var u = undefined / undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var b: boolean; var b = true; @@ -28,14 +36,14 @@ var n = 1e4; var n = 001; // Error in ES5 ~~~ -!!! Octal literals are not available when targeting ECMAScript 5 and higher. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. var n = 0x1; var n = -1; var n = -1.0; var n = -1e-4; var n = -003; // Error in ES5 ~~~ -!!! Octal literals are not available when targeting ECMAScript 5 and higher. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. var n = -0x1; var s: string; diff --git a/tests/baselines/reference/logicalNotExpression1.errors.txt b/tests/baselines/reference/logicalNotExpression1.errors.txt index b38a05bb31f..cd2a3a0941d 100644 --- a/tests/baselines/reference/logicalNotExpression1.errors.txt +++ b/tests/baselines/reference/logicalNotExpression1.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/logicalNotExpression1.ts(1,2): error TS2304: Cannot find name 'foo'. + + ==== tests/cases/compiler/logicalNotExpression1.ts (1 errors) ==== !foo; ~~~ -!!! Cannot find name 'foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/logicalNotOperatorInvalidOperations.errors.txt b/tests/baselines/reference/logicalNotOperatorInvalidOperations.errors.txt index 7b8e7de7d4e..3267d60a13a 100644 --- a/tests/baselines/reference/logicalNotOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/logicalNotOperatorInvalidOperations.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(5,17): error TS1005: ',' expected. +tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(5,18): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(11,16): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(8,16): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. + + ==== tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts (4 errors) ==== // Unary operator ! var b: number; @@ -5,16 +11,16 @@ // operand before ! var BOOLEAN1 = b!; //expect error ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // miss parentheses var BOOLEAN2 = !b + b; ~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. // miss an operand var BOOLEAN3 =!; ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.errors.txt index 07aa1630e9f..883f2ee5861 100644 --- a/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts(45,27): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts(46,27): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts(47,27): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. + + ==== tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts (3 errors) ==== // ! operator on any type @@ -45,13 +50,13 @@ var ResultIsBoolean16 = !(ANY + ANY1); var ResultIsBoolean17 = !(null + undefined); ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsBoolean18 = !(null + null); ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsBoolean19 = !(undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. // multiple ! operators var ResultIsBoolean20 = !!ANY; diff --git a/tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt b/tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt index 0daf93e9391..b273526b4f1 100644 --- a/tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt +++ b/tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/matchReturnTypeInAllBranches.ts(30,20): error TS2323: Type 'number' is not assignable to type 'boolean'. + + ==== tests/cases/compiler/matchReturnTypeInAllBranches.ts (1 errors) ==== // Represents a monster who enjoys ice cream class IceCreamMonster { @@ -30,7 +33,7 @@ { return 12345; ~~~~~ -!!! Type 'number' is not assignable to type 'boolean'. +!!! error TS2323: Type 'number' is not assignable to type 'boolean'. } } } diff --git a/tests/baselines/reference/matchingOfObjectLiteralConstraints.errors.txt b/tests/baselines/reference/matchingOfObjectLiteralConstraints.errors.txt index 6c9c0f65d19..edd917a4602 100644 --- a/tests/baselines/reference/matchingOfObjectLiteralConstraints.errors.txt +++ b/tests/baselines/reference/matchingOfObjectLiteralConstraints.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/matchingOfObjectLiteralConstraints.ts(1,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/compiler/matchingOfObjectLiteralConstraints.ts (1 errors) ==== function foo2(x: U, z: T) { } ~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo2({ y: "foo" }, "foo"); \ No newline at end of file diff --git a/tests/baselines/reference/maxConstraints.errors.txt b/tests/baselines/reference/maxConstraints.errors.txt index 8a525d1a673..c1d980b552e 100644 --- a/tests/baselines/reference/maxConstraints.errors.txt +++ b/tests/baselines/reference/maxConstraints.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/maxConstraints.ts(5,6): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable'. + + ==== tests/cases/compiler/maxConstraints.ts (2 errors) ==== interface Comparable { compareTo(other: T): number; @@ -5,9 +9,9 @@ interface Comparer { >(x: T, y: T): T; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y }; var maxResult = max2(1, 2); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Comparable'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable'. \ No newline at end of file diff --git a/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.errors.txt b/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.errors.txt index d0b707c9ff1..624438cf054 100644 --- a/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.errors.txt +++ b/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.errors.txt @@ -1,36 +1,46 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts(3,12): error TS2388: Function overload must not be static. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts(3,12): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts(8,5): error TS2387: Function overload must be static. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts(8,5): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts(13,12): error TS2388: Function overload must not be static. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts(13,12): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts(18,5): error TS2387: Function overload must be static. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts(18,5): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts (8 errors) ==== class C { foo(); static foo(); // error ~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } class D { static foo(); foo(); // error ~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } class E { foo(x: T); static foo(x: number); // error ~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } class F { static foo(x: number); foo(x: T); // error ~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt index 0a84fc1a751..45b1569dbfb 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(43,9): error TS2341: Property 'C.foo' is inaccessible. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(46,10): error TS2341: Property 'D.foo' is inaccessible. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(48,10): error TS2341: Property 'C.foo' is inaccessible. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(49,10): error TS2341: Property 'D.bar' is inaccessible. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts (4 errors) ==== class C { private foo(x: number); @@ -43,16 +49,16 @@ var c: C; var r = c.foo(1); // error ~~~~~ -!!! Property 'C.foo' is inaccessible. +!!! error TS2341: Property 'C.foo' is inaccessible. var d: D; var r2 = d.foo(2); // error ~~~~~ -!!! Property 'D.foo' is inaccessible. +!!! error TS2341: Property 'D.foo' is inaccessible. var r3 = C.foo(1); // error ~~~~~ -!!! Property 'C.foo' is inaccessible. +!!! error TS2341: Property 'C.foo' is inaccessible. var r4 = D.bar(''); // error ~~~~~ -!!! Property 'D.bar' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'D.bar' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt index 962a00d9534..57d92cc9696 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt @@ -1,28 +1,40 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(3,12): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(7,12): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(12,19): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(16,19): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(23,12): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(27,12): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(32,19): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(36,19): error TS2385: Overload signatures must all be public or private. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(42,9): error TS2341: Property 'C.foo' is inaccessible. +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(45,10): error TS2341: Property 'D.foo' is inaccessible. + + ==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts (10 errors) ==== class C { private foo(x: number); public foo(x: number, y: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private foo(x: any, y?: any) { } private bar(x: 'hi'); public bar(x: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private bar(x: number, y: string); private bar(x: any, y?: any) { } private static foo(x: number); public static foo(x: number, y: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private static foo(x: any, y?: any) { } private static bar(x: 'hi'); public static bar(x: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private static bar(x: number, y: string); private static bar(x: any, y?: any) { } } @@ -31,26 +43,26 @@ private foo(x: number); public foo(x: T, y: T); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private foo(x: any, y?: any) { } private bar(x: 'hi'); public bar(x: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private bar(x: T, y: T); private bar(x: any, y?: any) { } private static foo(x: number); public static foo(x: number, y: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private static foo(x: any, y?: any) { } private static bar(x: 'hi'); public static bar(x: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private static bar(x: number, y: string); private static bar(x: any, y?: any) { } } @@ -58,9 +70,9 @@ var c: C; var r = c.foo(1); // error ~~~~~ -!!! Property 'C.foo' is inaccessible. +!!! error TS2341: Property 'C.foo' is inaccessible. var d: D; var r2 = d.foo(2); // error ~~~~~ -!!! Property 'D.foo' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'D.foo' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/memberOverride.errors.txt b/tests/baselines/reference/memberOverride.errors.txt index 4b0b385829e..5cc005b7339 100644 --- a/tests/baselines/reference/memberOverride.errors.txt +++ b/tests/baselines/reference/memberOverride.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/memberOverride.ts(5,5): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/memberOverride.ts(8,5): error TS2323: Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/memberOverride.ts (2 errors) ==== // An object initialiser accepts the first definition for the same property with a different type signature // Should compile, since the second declaration of a overrides the first @@ -5,9 +9,9 @@ a: "", a: 5 ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. } var n: number = x.a; ~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/memberScope.errors.txt b/tests/baselines/reference/memberScope.errors.txt index 8c059a077fb..017a28d5f71 100644 --- a/tests/baselines/reference/memberScope.errors.txt +++ b/tests/baselines/reference/memberScope.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/memberScope.ts(4,11): error TS2304: Cannot find name 'Basil'. + + ==== tests/cases/compiler/memberScope.ts (1 errors) ==== module Salt { export class Pepper {} export module Basil { } var z = Basil.Pepper; ~~~~~ -!!! Cannot find name 'Basil'. +!!! error TS2304: Cannot find name 'Basil'. } \ No newline at end of file diff --git a/tests/baselines/reference/mergedDeclarations2.errors.txt b/tests/baselines/reference/mergedDeclarations2.errors.txt index a7aad4319ea..0b3801872af 100644 --- a/tests/baselines/reference/mergedDeclarations2.errors.txt +++ b/tests/baselines/reference/mergedDeclarations2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/mergedDeclarations2.ts(9,20): error TS2304: Cannot find name 'b'. + + ==== tests/cases/compiler/mergedDeclarations2.ts (1 errors) ==== enum Foo { b @@ -9,5 +12,5 @@ module Foo { export var x = b ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. } \ No newline at end of file diff --git a/tests/baselines/reference/mergedDeclarations3.errors.txt b/tests/baselines/reference/mergedDeclarations3.errors.txt index 38922ad62f7..8478027913b 100644 --- a/tests/baselines/reference/mergedDeclarations3.errors.txt +++ b/tests/baselines/reference/mergedDeclarations3.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/mergedDeclarations3.ts(37,7): error TS2339: Property 'x' does not exist on type 'typeof foo'. +tests/cases/compiler/mergedDeclarations3.ts(39,7): error TS2339: Property 'z' does not exist on type 'typeof foo'. + + ==== tests/cases/compiler/mergedDeclarations3.ts (2 errors) ==== module M { export enum Color { @@ -37,8 +41,8 @@ M.foo() // ok M.foo.x // error ~ -!!! Property 'x' does not exist on type 'typeof foo'. +!!! error TS2339: Property 'x' does not exist on type 'typeof foo'. M.foo.y // ok M.foo.z // error ~ -!!! Property 'z' does not exist on type 'typeof foo'. \ No newline at end of file +!!! error TS2339: Property 'z' does not exist on type 'typeof foo'. \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt index cae2b5a7053..28aa8fa4be8 100644 --- a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(6,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(15,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(39,9): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts (3 errors) ==== interface A { x: string; // error @@ -6,7 +11,7 @@ interface A { x: number; ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } module M { @@ -17,7 +22,7 @@ interface A { x: number; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } } @@ -43,6 +48,6 @@ export interface A { x: number; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt index 6c2dd7b657e..74b6c39b1f7 100644 --- a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt @@ -1,3 +1,8 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(6,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(15,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(39,9): error TS2300: Duplicate identifier 'x'. + + ==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts (3 errors) ==== interface A { x: string; // error @@ -6,7 +11,7 @@ interface A { x: string; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } module M { @@ -17,7 +22,7 @@ interface A { x: T; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } } @@ -43,6 +48,6 @@ export interface A { x: T; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt b/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt index 89209f1a4dd..768abc0f9c0 100644 --- a/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt @@ -1,10 +1,15 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithIndexers2.ts(4,5): error TS2413: Numeric index type 'string' is not assignable to string index type '{ length: string; }'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithIndexers2.ts(14,5): error TS2411: Property ''a'' of type 'number' is not assignable to string index type '{ length: number; }'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithIndexers2.ts(20,5): error TS2412: Property '1' of type '{ length: number; }' is not assignable to numeric index type 'string'. + + ==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithIndexers2.ts (3 errors) ==== // indexers should behave like other members when merging interface declarations interface A { [x: number]: string; // error ~~~~~~~~~~~~~~~~~~~~ -!!! Numeric index type 'string' is not assignable to string index type '{ length: string; }'. +!!! error TS2413: Numeric index type 'string' is not assignable to string index type '{ length: string; }'. } @@ -16,7 +21,7 @@ [x: number]: string; 'a': number; //error ~~~~~~~~~~~~ -!!! Property ''a'' of type 'number' is not assignable to string index type '{ length: number; }'. +!!! error TS2411: Property ''a'' of type 'number' is not assignable to string index type '{ length: number; }'. } @@ -24,6 +29,6 @@ [x: string]: { length: number }; 1: { length: number }; // error ~~~~~~~~~~~~~~~~~~~~~~ -!!! Property '1' of type '{ length: number; }' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '1' of type '{ length: number; }' is not assignable to numeric index type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt index 3ad843c7f17..3014b55a8cb 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt @@ -1,3 +1,10 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(13,7): error TS2421: Class 'D' incorrectly implements interface 'A': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(19,7): error TS2421: Class 'E' incorrectly implements interface 'A': + Private property 'x' cannot be reimplemented. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(26,9): error TS2341: Property 'C.x' is inaccessible. + + ==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts (3 errors) ==== class C { private x: number; @@ -13,8 +20,8 @@ class D implements A { // error ~ -!!! Class 'D' incorrectly implements interface 'A': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'D' incorrectly implements interface 'A': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x: number; y: string; z: string; @@ -22,8 +29,8 @@ class E implements A { // error ~ -!!! Class 'E' incorrectly implements interface 'A': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'E' incorrectly implements interface 'A': +!!! error TS2421: Private property 'x' cannot be reimplemented. x: number; y: string; z: string; @@ -32,4 +39,4 @@ var a: A; var r = a.x; // error ~~~ -!!! Property 'C.x' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'C.x' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt index 7ab40587207..64bc61efdf9 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(17,7): error TS2421: Class 'D' incorrectly implements interface 'A': + Private property 'w' cannot be reimplemented. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(23,7): error TS2416: Class 'E' incorrectly extends base class 'C2': + Private property 'w' cannot be reimplemented. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(23,7): error TS2421: Class 'E' incorrectly implements interface 'A': + Property 'x' is missing in type 'E'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(30,9): error TS2341: Property 'C.x' is inaccessible. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(31,10): error TS2341: Property 'C2.w' is inaccessible. + + ==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts (5 errors) ==== class C { private x: number; @@ -17,8 +27,8 @@ class D extends C implements A { // error ~ -!!! Class 'D' incorrectly implements interface 'A': -!!! Private property 'w' cannot be reimplemented. +!!! error TS2421: Class 'D' incorrectly implements interface 'A': +!!! error TS2421: Private property 'w' cannot be reimplemented. private w: number; y: string; z: string; @@ -26,11 +36,11 @@ class E extends C2 implements A { // error ~ -!!! Class 'E' incorrectly extends base class 'C2': -!!! Private property 'w' cannot be reimplemented. +!!! error TS2416: Class 'E' incorrectly extends base class 'C2': +!!! error TS2416: Private property 'w' cannot be reimplemented. ~ -!!! Class 'E' incorrectly implements interface 'A': -!!! Property 'x' is missing in type 'E'. +!!! error TS2421: Class 'E' incorrectly implements interface 'A': +!!! error TS2421: Property 'x' is missing in type 'E'. w: number; y: string; z: string; @@ -39,7 +49,7 @@ var a: A; var r = a.x; // error ~~~ -!!! Property 'C.x' is inaccessible. +!!! error TS2341: Property 'C.x' is inaccessible. var r2 = a.w; // error ~~~ -!!! Property 'C2.w' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'C2.w' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt index 9956bb45dc8..0fadcfde588 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': + Named properties 'x' of types 'C' and 'C2' are not identical. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts(31,15): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': + Named properties 'x' of types 'C' and 'C2' are not identical. + + ==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts (2 errors) ==== class C { private x: number; @@ -9,8 +15,8 @@ interface A extends C { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } @@ -34,8 +40,8 @@ interface A extends C { // error, privates conflict ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } diff --git a/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt b/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt index 76f837f8369..3687a0b79e8 100644 --- a/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases4.ts(19,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C': + Named properties 'a' of types 'C' and 'C' are not identical. + + ==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases4.ts (1 errors) ==== // merged interfaces behave as if all extends clauses from each declaration are merged together @@ -19,8 +23,8 @@ interface A extends C, C3 { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C': -!!! Named properties 'a' of types 'C' and 'C' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C': +!!! error TS2320: Named properties 'a' of types 'C' and 'C' are not identical. y: T; } diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt b/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt index 3cf329d427c..25000ce2f5c 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/mergedModuleDeclarationCodeGen.ts(1,15): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/compiler/mergedModuleDeclarationCodeGen.ts (1 errors) ==== export module X { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export module Y { class A { constructor(Y: any) { diff --git a/tests/baselines/reference/methodSignaturesWithOverloads.errors.txt b/tests/baselines/reference/methodSignaturesWithOverloads.errors.txt index f41e12db995..57b70489415 100644 --- a/tests/baselines/reference/methodSignaturesWithOverloads.errors.txt +++ b/tests/baselines/reference/methodSignaturesWithOverloads.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/methodSignaturesWithOverloads.ts(5,5): error TS2386: Overload signatures must all be optional or required. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/methodSignaturesWithOverloads.ts(14,5): error TS2386: Overload signatures must all be optional or required. + + ==== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/methodSignaturesWithOverloads.ts (2 errors) ==== // Object type literals permit overloads with optionality but they must match @@ -5,7 +9,7 @@ func4?(x: number): number; func4(s: string): string; // error, mismatched optionality ~~~~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. func5?: { (x: number): number; (s: string): string; @@ -16,7 +20,7 @@ func4(x: T): number; func4? (s: T): string; // error, mismatched optionality ~~~~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. func5?: { (x: T): number; (s: T): string; diff --git a/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt b/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt index 450717d5124..e294d8fbc72 100644 --- a/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt +++ b/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/mismatchedClassConstructorVariable.ts(2,7): error TS2300: Duplicate identifier 'baz'. + + ==== tests/cases/compiler/mismatchedClassConstructorVariable.ts (1 errors) ==== var baz: foo; class baz { } ~~~ -!!! Duplicate identifier 'baz'. +!!! error TS2300: Duplicate identifier 'baz'. class foo { } \ No newline at end of file diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt index 6e2647bc45d..557f60967a6 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/mismatchedExplicitTypeParameterAndArgumentType.ts(10,30): error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'number[]'. + Type '{}' is not assignable to type 'number'. +tests/cases/compiler/mismatchedExplicitTypeParameterAndArgumentType.ts(11,11): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/mismatchedExplicitTypeParameterAndArgumentType.ts (2 errors) ==== function map(xs: T[], f: (x: T) => U) { var ys: U[] = []; @@ -10,9 +15,9 @@ var r6 = map([1, ""], (x) => x.toString()); var r7 = map([1, ""], (x) => x.toString()); // error ~~~~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type 'number[]'. -!!! Type '{}' is not assignable to type 'number'. +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'number[]'. +!!! error TS2345: Type '{}' is not assignable to type 'number'. var r7b = map([1, ""], (x) => x.toString()); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r8 = map([1, ""], (x) => x.toString()); \ No newline at end of file diff --git a/tests/baselines/reference/missingRequiredDeclare.d.errors.txt b/tests/baselines/reference/missingRequiredDeclare.d.errors.txt index 932512ba8d8..dc713c86d89 100644 --- a/tests/baselines/reference/missingRequiredDeclare.d.errors.txt +++ b/tests/baselines/reference/missingRequiredDeclare.d.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/missingRequiredDeclare.d.ts(1,1): error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. +tests/cases/compiler/missingRequiredDeclare.d.ts(1,7): error TS1039: Initializers are not allowed in ambient contexts. + + ==== tests/cases/compiler/missingRequiredDeclare.d.ts (2 errors) ==== var x = 1; ~~~ -!!! A 'declare' modifier is required for a top level declaration in a .d.ts file. +!!! error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. ~ -!!! Initializers are not allowed in ambient contexts. \ No newline at end of file +!!! error TS1039: Initializers are not allowed in ambient contexts. \ No newline at end of file diff --git a/tests/baselines/reference/missingReturnStatement.errors.txt b/tests/baselines/reference/missingReturnStatement.errors.txt index 9a92adf4c03..c7cedd793de 100644 --- a/tests/baselines/reference/missingReturnStatement.errors.txt +++ b/tests/baselines/reference/missingReturnStatement.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/missingReturnStatement.ts(3,22): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. + + ==== tests/cases/compiler/missingReturnStatement.ts (1 errors) ==== module Test { export class Bug { public foo():string { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. } } } diff --git a/tests/baselines/reference/missingReturnStatement1.errors.txt b/tests/baselines/reference/missingReturnStatement1.errors.txt index d1d47368bb1..de471f90ac4 100644 --- a/tests/baselines/reference/missingReturnStatement1.errors.txt +++ b/tests/baselines/reference/missingReturnStatement1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/missingReturnStatement1.ts(2,12): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. + + ==== tests/cases/compiler/missingReturnStatement1.ts (1 errors) ==== class Foo { foo(): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. //return 4; } } diff --git a/tests/baselines/reference/missingTypeArguments1.errors.txt b/tests/baselines/reference/missingTypeArguments1.errors.txt index 87bb648a751..c0e0f3e18bb 100644 --- a/tests/baselines/reference/missingTypeArguments1.errors.txt +++ b/tests/baselines/reference/missingTypeArguments1.errors.txt @@ -1,73 +1,85 @@ +tests/cases/compiler/missingTypeArguments1.ts(4,15): error TS2314: Generic type 'X' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(9,26): error TS2314: Generic type 'X2' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(14,9): error TS2314: Generic type 'X3' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(19,11): error TS2314: Generic type 'X4' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(24,9): error TS2314: Generic type 'X5' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(29,15): error TS2314: Generic type 'Y' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(34,26): error TS2314: Generic type 'Y' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(39,9): error TS2314: Generic type 'Y' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(44,11): error TS2314: Generic type 'Y' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments1.ts(49,9): error TS2314: Generic type 'Y' requires 1 type argument(s). + + ==== tests/cases/compiler/missingTypeArguments1.ts (10 errors) ==== interface I { } class Y {} class X { p1: () => X; ~ -!!! Generic type 'X' requires 1 type argument(s). +!!! error TS2314: Generic type 'X' requires 1 type argument(s). } var a: X; class X2 { p2: { [idx: number]: X2 } ~~ -!!! Generic type 'X2' requires 1 type argument(s). +!!! error TS2314: Generic type 'X2' requires 1 type argument(s). } var a2: X2; class X3 { p3: X3[] ~~ -!!! Generic type 'X3' requires 1 type argument(s). +!!! error TS2314: Generic type 'X3' requires 1 type argument(s). } var a3: X3; class X4 { p4: I ~~ -!!! Generic type 'X4' requires 1 type argument(s). +!!! error TS2314: Generic type 'X4' requires 1 type argument(s). } var a4: X4; class X5 { p5: X5 ~~ -!!! Generic type 'X5' requires 1 type argument(s). +!!! error TS2314: Generic type 'X5' requires 1 type argument(s). } var a5: X5; class X6 { p6: () => Y; ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a6: X6; class X7 { p7: { [idx: number]: Y } ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a7: X7; class X8 { p8: Y[] ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a8: X8; class X9 { p9: I ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a9: X9; class X10 { pa: Y ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a10: X10; diff --git a/tests/baselines/reference/missingTypeArguments2.errors.txt b/tests/baselines/reference/missingTypeArguments2.errors.txt index 34daf27e841..0b51f40c1ed 100644 --- a/tests/baselines/reference/missingTypeArguments2.errors.txt +++ b/tests/baselines/reference/missingTypeArguments2.errors.txt @@ -1,15 +1,21 @@ +tests/cases/compiler/missingTypeArguments2.ts(3,14): error TS2314: Generic type 'A' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments2.ts(4,5): error TS2314: Generic type 'A' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments2.ts(5,10): error TS2314: Generic type 'A' requires 1 type argument(s). +tests/cases/compiler/missingTypeArguments2.ts(6,5): error TS2314: Generic type 'A' requires 1 type argument(s). + + ==== tests/cases/compiler/missingTypeArguments2.ts (4 errors) ==== class A { } var x: () => A; ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). (a: A) => { }; ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). var y: A; ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). (): A => null; ~ -!!! Generic type 'A' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'A' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/mixingStaticAndInstanceOverloads.errors.txt b/tests/baselines/reference/mixingStaticAndInstanceOverloads.errors.txt index 300d9d0309f..96000c73536 100644 --- a/tests/baselines/reference/mixingStaticAndInstanceOverloads.errors.txt +++ b/tests/baselines/reference/mixingStaticAndInstanceOverloads.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/mixingStaticAndInstanceOverloads.ts(5,12): error TS2388: Function overload must not be static. +tests/cases/compiler/mixingStaticAndInstanceOverloads.ts(11,5): error TS2387: Function overload must be static. +tests/cases/compiler/mixingStaticAndInstanceOverloads.ts(16,12): error TS2388: Function overload must not be static. +tests/cases/compiler/mixingStaticAndInstanceOverloads.ts(17,5): error TS2387: Function overload must be static. +tests/cases/compiler/mixingStaticAndInstanceOverloads.ts(22,5): error TS2387: Function overload must be static. +tests/cases/compiler/mixingStaticAndInstanceOverloads.ts(23,12): error TS2388: Function overload must not be static. + + ==== tests/cases/compiler/mixingStaticAndInstanceOverloads.ts (6 errors) ==== class C1 { // ERROR @@ -5,7 +13,7 @@ foo1(s: string); static foo1(a) { } ~~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. } class C2 { // ERROR @@ -13,27 +21,27 @@ static foo2(s: string); foo2(a) { } ~~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. } class C3 { // ERROR foo3(n: number); static foo3(s: string); ~~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. foo3(a) { } ~~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. } class C4 { // ERROR static foo4(n: number); foo4(s: string); ~~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. static foo4(a) { } ~~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. } class C5 { // OK diff --git a/tests/baselines/reference/moduleAndInterfaceSharingName2.errors.txt b/tests/baselines/reference/moduleAndInterfaceSharingName2.errors.txt index 32368edf110..f69ff4d5cca 100644 --- a/tests/baselines/reference/moduleAndInterfaceSharingName2.errors.txt +++ b/tests/baselines/reference/moduleAndInterfaceSharingName2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/moduleAndInterfaceSharingName2.ts(8,9): error TS2315: Type 'Y' is not generic. + + ==== tests/cases/compiler/moduleAndInterfaceSharingName2.ts (1 errors) ==== module X { export module Y { @@ -8,4 +11,4 @@ var z: X.Y.Z = null; var z2: X.Y; ~~~~~~~~~~~ -!!! Type 'Y' is not generic. \ No newline at end of file +!!! error TS2315: Type 'Y' is not generic. \ No newline at end of file diff --git a/tests/baselines/reference/moduleAndInterfaceWithSameName.errors.txt b/tests/baselines/reference/moduleAndInterfaceWithSameName.errors.txt index 7f8ffb11a01..60f36b92093 100644 --- a/tests/baselines/reference/moduleAndInterfaceWithSameName.errors.txt +++ b/tests/baselines/reference/moduleAndInterfaceWithSameName.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/moduleAndInterfaceWithSameName.ts(21,15): error TS2339: Property 'Bar' does not exist on type 'typeof Foo2'. + + ==== tests/cases/compiler/moduleAndInterfaceWithSameName.ts (1 errors) ==== module Foo1 { export module Bar { @@ -21,7 +24,7 @@ var z2 = Foo2.Bar.y; // Error for using interface name as a value. ~~~ -!!! Property 'Bar' does not exist on type 'typeof Foo2'. +!!! error TS2339: Property 'Bar' does not exist on type 'typeof Foo2'. module Foo3 { export module Bar { diff --git a/tests/baselines/reference/moduleAsBaseType.errors.txt b/tests/baselines/reference/moduleAsBaseType.errors.txt index 942efd23811..ffa30ad0ab3 100644 --- a/tests/baselines/reference/moduleAsBaseType.errors.txt +++ b/tests/baselines/reference/moduleAsBaseType.errors.txt @@ -1,11 +1,16 @@ +tests/cases/compiler/moduleAsBaseType.ts(2,17): error TS2304: Cannot find name 'M'. +tests/cases/compiler/moduleAsBaseType.ts(3,21): error TS2304: Cannot find name 'M'. +tests/cases/compiler/moduleAsBaseType.ts(4,21): error TS2304: Cannot find name 'M'. + + ==== tests/cases/compiler/moduleAsBaseType.ts (3 errors) ==== module M {} class C extends M {} ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. interface I extends M { } ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. class C2 implements M { } ~ -!!! Cannot find name 'M'. \ No newline at end of file +!!! error TS2304: Cannot find name 'M'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleAssignmentCompat1.errors.txt b/tests/baselines/reference/moduleAssignmentCompat1.errors.txt index b23e908c086..5b4fe8d3c7c 100644 --- a/tests/baselines/reference/moduleAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/moduleAssignmentCompat1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/moduleAssignmentCompat1.ts(9,8): error TS2304: Cannot find name 'A'. +tests/cases/compiler/moduleAssignmentCompat1.ts(10,8): error TS2304: Cannot find name 'B'. + + ==== tests/cases/compiler/moduleAssignmentCompat1.ts (2 errors) ==== module A { export class C { } @@ -9,10 +13,10 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b: B; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. // no error a = b; diff --git a/tests/baselines/reference/moduleAssignmentCompat2.errors.txt b/tests/baselines/reference/moduleAssignmentCompat2.errors.txt index 9e6e1421685..5a14ff03ead 100644 --- a/tests/baselines/reference/moduleAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/moduleAssignmentCompat2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/moduleAssignmentCompat2.ts(9,8): error TS2304: Cannot find name 'A'. +tests/cases/compiler/moduleAssignmentCompat2.ts(10,8): error TS2304: Cannot find name 'B'. + + ==== tests/cases/compiler/moduleAssignmentCompat2.ts (2 errors) ==== module A { export class C { } @@ -9,10 +13,10 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b: B; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. a = b; b = a; // error \ No newline at end of file diff --git a/tests/baselines/reference/moduleAssignmentCompat3.errors.txt b/tests/baselines/reference/moduleAssignmentCompat3.errors.txt index c7f5b293da9..656fad20a7e 100644 --- a/tests/baselines/reference/moduleAssignmentCompat3.errors.txt +++ b/tests/baselines/reference/moduleAssignmentCompat3.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/moduleAssignmentCompat3.ts(8,8): error TS2304: Cannot find name 'A'. +tests/cases/compiler/moduleAssignmentCompat3.ts(9,8): error TS2304: Cannot find name 'B'. + + ==== tests/cases/compiler/moduleAssignmentCompat3.ts (2 errors) ==== module A { export var x = 1; @@ -8,10 +12,10 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b: B; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. // both errors a = b; diff --git a/tests/baselines/reference/moduleAssignmentCompat4.errors.txt b/tests/baselines/reference/moduleAssignmentCompat4.errors.txt index 02b7b9531c8..7d6204b53e1 100644 --- a/tests/baselines/reference/moduleAssignmentCompat4.errors.txt +++ b/tests/baselines/reference/moduleAssignmentCompat4.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/moduleAssignmentCompat4.ts(12,8): error TS2304: Cannot find name 'A'. +tests/cases/compiler/moduleAssignmentCompat4.ts(13,8): error TS2304: Cannot find name 'B'. + + ==== tests/cases/compiler/moduleAssignmentCompat4.ts (2 errors) ==== module A { export module M { @@ -12,10 +16,10 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b: B; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. a = b; b = a; // error \ No newline at end of file diff --git a/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt b/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt index 583d88c0b8b..3e52f51445d 100644 --- a/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt +++ b/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/moduleClassArrayCodeGenTest.ts(10,9): error TS2305: Module 'M' has no exported member 'B'. + + ==== tests/cases/compiler/moduleClassArrayCodeGenTest.ts (1 errors) ==== // Invalid code gen for Array of Module class @@ -10,4 +13,4 @@ var t: M.A[] = []; var t2: M.B[] = []; ~~~ -!!! Module 'M' has no exported member 'B'. \ No newline at end of file +!!! error TS2305: Module 'M' has no exported member 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleCrashBug1.errors.txt b/tests/baselines/reference/moduleCrashBug1.errors.txt index 8f25fce0c20..e50e2a1c3e6 100644 --- a/tests/baselines/reference/moduleCrashBug1.errors.txt +++ b/tests/baselines/reference/moduleCrashBug1.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/moduleCrashBug1.ts(18,9): error TS2304: Cannot find name '_modes'. + + ==== tests/cases/compiler/moduleCrashBug1.ts (1 errors) ==== module _modes { export interface IMode { @@ -18,7 +21,7 @@ var m : _modes; ~~~~~~ -!!! Cannot find name '_modes'. +!!! error TS2304: Cannot find name '_modes'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleExports1.errors.txt b/tests/baselines/reference/moduleExports1.errors.txt index e890f149c7f..18b65654cea 100644 --- a/tests/baselines/reference/moduleExports1.errors.txt +++ b/tests/baselines/reference/moduleExports1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/moduleExports1.ts(13,6): error TS2304: Cannot find name 'module'. +tests/cases/compiler/moduleExports1.ts(13,22): error TS2304: Cannot find name 'module'. + + ==== tests/cases/compiler/moduleExports1.ts (2 errors) ==== export module TypeScript.Strasse.Street { export class Rue { @@ -13,6 +17,6 @@ if (!module.exports) module.exports = ""; ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. ~~~~~~ -!!! Cannot find name 'module'. \ No newline at end of file +!!! error TS2304: Cannot find name 'module'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleImport.errors.txt b/tests/baselines/reference/moduleImport.errors.txt index 9a4e57bdc06..95163ef119f 100644 --- a/tests/baselines/reference/moduleImport.errors.txt +++ b/tests/baselines/reference/moduleImport.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/moduleImport.ts(2,2): error TS2305: Module 'X' has no exported member 'Y'. + + ==== tests/cases/compiler/moduleImport.ts (1 errors) ==== module A.B.C { import XYZ = X.Y.Z; ~~~~~~~~~~~~~~~~~~~ -!!! Module 'X' has no exported member 'Y'. +!!! error TS2305: Module 'X' has no exported member 'Y'. export function ping(x: number) { if (x>0) XYZ.pong (x-1); } diff --git a/tests/baselines/reference/moduleInTypePosition1.errors.txt b/tests/baselines/reference/moduleInTypePosition1.errors.txt index 7941093c10c..a5b5076e172 100644 --- a/tests/baselines/reference/moduleInTypePosition1.errors.txt +++ b/tests/baselines/reference/moduleInTypePosition1.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/moduleInTypePosition1_1.ts(3,14): error TS2304: Cannot find name 'WinJS'. + + ==== tests/cases/compiler/moduleInTypePosition1_1.ts (1 errors) ==== /// import WinJS = require('moduleInTypePosition1_0'); var x = (w1: WinJS) => { }; ~~~~~ -!!! Cannot find name 'WinJS'. +!!! error TS2304: Cannot find name 'WinJS'. ==== tests/cases/compiler/moduleInTypePosition1_0.ts (0 errors) ==== export class Promise { diff --git a/tests/baselines/reference/moduleKeywordRepeatError.errors.txt b/tests/baselines/reference/moduleKeywordRepeatError.errors.txt index 33bb480291f..d3f5924e193 100644 --- a/tests/baselines/reference/moduleKeywordRepeatError.errors.txt +++ b/tests/baselines/reference/moduleKeywordRepeatError.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/moduleKeywordRepeatError.ts(3,15): error TS1005: ';' expected. +tests/cases/compiler/moduleKeywordRepeatError.ts(3,1): error TS2304: Cannot find name 'module'. + + ==== tests/cases/compiler/moduleKeywordRepeatError.ts (2 errors) ==== // "module.module { }" should raise a syntax error module.module { } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. \ No newline at end of file +!!! error TS2304: Cannot find name 'module'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleNewExportBug.errors.txt b/tests/baselines/reference/moduleNewExportBug.errors.txt index dd89b135bdd..829fe83ae7b 100644 --- a/tests/baselines/reference/moduleNewExportBug.errors.txt +++ b/tests/baselines/reference/moduleNewExportBug.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/moduleNewExportBug.ts(10,9): error TS2305: Module 'mod1' has no exported member 'C'. + + ==== tests/cases/compiler/moduleNewExportBug.ts (1 errors) ==== module mod1 { interface mInt { @@ -10,7 +13,7 @@ var c : mod1.C; // ERROR: C should not be visible ~~~~~~ -!!! Module 'mod1' has no exported member 'C'. +!!! error TS2305: Module 'mod1' has no exported member 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleProperty1.errors.txt b/tests/baselines/reference/moduleProperty1.errors.txt index 00ff0248b3f..65180c1d64b 100644 --- a/tests/baselines/reference/moduleProperty1.errors.txt +++ b/tests/baselines/reference/moduleProperty1.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/moduleProperty1.ts(9,5): error TS1128: Declaration or statement expected. +tests/cases/compiler/moduleProperty1.ts(9,13): error TS2304: Cannot find name 'y'. +tests/cases/compiler/moduleProperty1.ts(10,20): error TS2304: Cannot find name 'y'. + + ==== tests/cases/compiler/moduleProperty1.ts (3 errors) ==== module M { var x=10; // variable local to this module body @@ -9,10 +14,10 @@ var x = 10; // variable local to this module body private y = x; // can't use private in modules ~~~~~~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. ~ -!!! Cannot find name 'y'. +!!! error TS2304: Cannot find name 'y'. export var z = y; // property visible to any code ~ -!!! Cannot find name 'y'. +!!! error TS2304: Cannot find name 'y'. } \ No newline at end of file diff --git a/tests/baselines/reference/moduleProperty2.errors.txt b/tests/baselines/reference/moduleProperty2.errors.txt index 8b658f7692a..7bb1cce608b 100644 --- a/tests/baselines/reference/moduleProperty2.errors.txt +++ b/tests/baselines/reference/moduleProperty2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/moduleProperty2.ts(7,15): error TS2304: Cannot find name 'x'. +tests/cases/compiler/moduleProperty2.ts(12,17): error TS2339: Property 'y' does not exist on type 'typeof M'. + + ==== tests/cases/compiler/moduleProperty2.ts (2 errors) ==== module M { function f() { @@ -7,13 +11,13 @@ export var z; var test1=x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. var test2=y; // y visible because same module } module N { var test3=M.y; // nope y private property of M ~ -!!! Property 'y' does not exist on type 'typeof M'. +!!! error TS2339: Property 'y' does not exist on type 'typeof M'. var test4=M.z; // ok public property of M } \ No newline at end of file diff --git a/tests/baselines/reference/moduleScoping.errors.txt b/tests/baselines/reference/moduleScoping.errors.txt index d80f82e9443..1468d3e33bf 100644 --- a/tests/baselines/reference/moduleScoping.errors.txt +++ b/tests/baselines/reference/moduleScoping.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/externalModules/file1.ts (0 errors) ==== var v1 = "sausages"; // Global scope @@ -8,7 +11,7 @@ ==== tests/cases/conformance/externalModules/file3.ts (1 errors) ==== export var v3 = true; ~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. var v2 = [1,2,3]; // Module scope. Should not appear in global scope ==== tests/cases/conformance/externalModules/file4.ts (0 errors) ==== diff --git a/tests/baselines/reference/moduleVisibilityTest2.errors.txt b/tests/baselines/reference/moduleVisibilityTest2.errors.txt index bed0b43505b..9620b48cdfb 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.errors.txt +++ b/tests/baselines/reference/moduleVisibilityTest2.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/moduleVisibilityTest2.ts(57,17): error TS2304: Cannot find name 'x'. +tests/cases/compiler/moduleVisibilityTest2.ts(58,21): error TS2339: Property 'E' does not exist on type 'typeof M'. +tests/cases/compiler/moduleVisibilityTest2.ts(61,14): error TS2305: Module 'M' has no exported member 'I'. +tests/cases/compiler/moduleVisibilityTest2.ts(61,21): error TS2305: Module 'M' has no exported member 'I'. +tests/cases/compiler/moduleVisibilityTest2.ts(64,11): error TS2339: Property 'x' does not exist on type 'typeof M'. +tests/cases/compiler/moduleVisibilityTest2.ts(65,15): error TS2339: Property 'E' does not exist on type 'typeof M'. + + ==== tests/cases/compiler/moduleVisibilityTest2.ts (6 errors) ==== @@ -57,25 +65,25 @@ module M { export var c = x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. export var meb = M.E.B; ~ -!!! Property 'E' does not exist on type 'typeof M'. +!!! error TS2339: Property 'E' does not exist on type 'typeof M'. } var cprime : M.I = null; ~~~ -!!! Module 'M' has no exported member 'I'. +!!! error TS2305: Module 'M' has no exported member 'I'. ~~~ -!!! Module 'M' has no exported member 'I'. +!!! error TS2305: Module 'M' has no exported member 'I'. var c = new M.C(); var z = M.x; ~ -!!! Property 'x' does not exist on type 'typeof M'. +!!! error TS2339: Property 'x' does not exist on type 'typeof M'. var alpha = M.E.A; ~ -!!! Property 'E' does not exist on type 'typeof M'. +!!! error TS2339: Property 'E' does not exist on type 'typeof M'. var omega = M.exported_var; c.someMethodThatCallsAnOuterMethod(); \ No newline at end of file diff --git a/tests/baselines/reference/moduleVisibilityTest3.errors.txt b/tests/baselines/reference/moduleVisibilityTest3.errors.txt index d13c597d6ce..581d96fc1df 100644 --- a/tests/baselines/reference/moduleVisibilityTest3.errors.txt +++ b/tests/baselines/reference/moduleVisibilityTest3.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/moduleVisibilityTest3.ts(20,22): error TS2304: Cannot find name 'modes'. +tests/cases/compiler/moduleVisibilityTest3.ts(20,33): error TS2305: Module '_modes' has no exported member 'Mode'. +tests/cases/compiler/moduleVisibilityTest3.ts(21,16): error TS2305: Module '_modes' has no exported member 'Mode'. + + ==== tests/cases/compiler/moduleVisibilityTest3.ts (3 errors) ==== module _modes { export interface IMode { @@ -20,12 +25,12 @@ class Bug { constructor(p1: modes, p2: modes.Mode) {// should be an error on p2 - it's not exported ~~~~~ -!!! Cannot find name 'modes'. +!!! error TS2304: Cannot find name 'modes'. ~~~~~~~~~~ -!!! Module '_modes' has no exported member 'Mode'. +!!! error TS2305: Module '_modes' has no exported member 'Mode'. var x:modes.Mode; ~~~~~~~~~~ -!!! Module '_modes' has no exported member 'Mode'. +!!! error TS2305: Module '_modes' has no exported member 'Mode'. } } diff --git a/tests/baselines/reference/moduleWithNoValuesAsType.errors.txt b/tests/baselines/reference/moduleWithNoValuesAsType.errors.txt index e22bdb1c7f2..c387f5d62f4 100644 --- a/tests/baselines/reference/moduleWithNoValuesAsType.errors.txt +++ b/tests/baselines/reference/moduleWithNoValuesAsType.errors.txt @@ -1,15 +1,20 @@ +tests/cases/compiler/moduleWithNoValuesAsType.ts(2,8): error TS2304: Cannot find name 'A'. +tests/cases/compiler/moduleWithNoValuesAsType.ts(7,8): error TS2304: Cannot find name 'B'. +tests/cases/compiler/moduleWithNoValuesAsType.ts(15,8): error TS2304: Cannot find name 'C'. + + ==== tests/cases/compiler/moduleWithNoValuesAsType.ts (3 errors) ==== module A { } var a: A; // error ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. module B { interface I {} } var b: B; // error ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. module C { module M { @@ -19,4 +24,4 @@ var c: C; // error ~ -!!! Cannot find name 'C'. \ No newline at end of file +!!! error TS2304: Cannot find name 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleWithValuesAsType.errors.txt b/tests/baselines/reference/moduleWithValuesAsType.errors.txt index cf496f76627..2bbb94f5076 100644 --- a/tests/baselines/reference/moduleWithValuesAsType.errors.txt +++ b/tests/baselines/reference/moduleWithValuesAsType.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/moduleWithValuesAsType.ts(5,8): error TS2304: Cannot find name 'A'. + + ==== tests/cases/compiler/moduleWithValuesAsType.ts (1 errors) ==== module A { var b = 1; @@ -5,4 +8,4 @@ var a: A; // no error ~ -!!! Cannot find name 'A'. \ No newline at end of file +!!! error TS2304: Cannot find name 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt b/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt index c2abe8fc6b9..6174a6a95db 100644 --- a/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt +++ b/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/module_augmentExistingAmbientVariable.ts(3,8): error TS2300: Duplicate identifier 'console'. + + ==== tests/cases/compiler/module_augmentExistingAmbientVariable.ts (1 errors) ==== declare var console: any; module console { ~~~~~~~ -!!! Duplicate identifier 'console'. +!!! error TS2300: Duplicate identifier 'console'. export var x = 2; } \ No newline at end of file diff --git a/tests/baselines/reference/module_augmentExistingVariable.errors.txt b/tests/baselines/reference/module_augmentExistingVariable.errors.txt index 25bd8b843fa..a829d094819 100644 --- a/tests/baselines/reference/module_augmentExistingVariable.errors.txt +++ b/tests/baselines/reference/module_augmentExistingVariable.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/module_augmentExistingVariable.ts(3,8): error TS2300: Duplicate identifier 'console'. + + ==== tests/cases/compiler/module_augmentExistingVariable.ts (1 errors) ==== var console: any; module console { ~~~~~~~ -!!! Duplicate identifier 'console'. +!!! error TS2300: Duplicate identifier 'console'. export var x = 2; } \ No newline at end of file diff --git a/tests/baselines/reference/moduledecl.errors.txt b/tests/baselines/reference/moduledecl.errors.txt index 927f143183e..2ef60f058c2 100644 --- a/tests/baselines/reference/moduledecl.errors.txt +++ b/tests/baselines/reference/moduledecl.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/moduledecl.ts(164,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/moduledecl.ts(172,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/moduledecl.ts (2 errors) ==== module a { } @@ -164,7 +168,7 @@ } private get c2() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return new C2_private(); } public getC1_public() { @@ -174,7 +178,7 @@ } public get c1() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return new C1_public(); } } diff --git a/tests/baselines/reference/multiExtendsSplitInterfaces1.errors.txt b/tests/baselines/reference/multiExtendsSplitInterfaces1.errors.txt index b412d2ea448..bc7f41ad0c7 100644 --- a/tests/baselines/reference/multiExtendsSplitInterfaces1.errors.txt +++ b/tests/baselines/reference/multiExtendsSplitInterfaces1.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/multiExtendsSplitInterfaces1.ts(1,1): error TS2304: Cannot find name 'self'. + + ==== tests/cases/compiler/multiExtendsSplitInterfaces1.ts (1 errors) ==== self.cancelAnimationFrame(0); ~~~~ -!!! Cannot find name 'self'. \ No newline at end of file +!!! error TS2304: Cannot find name 'self'. \ No newline at end of file diff --git a/tests/baselines/reference/multiLineErrors.errors.txt b/tests/baselines/reference/multiLineErrors.errors.txt index 911c07731e3..1f28f758c38 100644 --- a/tests/baselines/reference/multiLineErrors.errors.txt +++ b/tests/baselines/reference/multiLineErrors.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/multiLineErrors.ts(3,22): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/compiler/multiLineErrors.ts(21,1): error TS2322: Type 'A2' is not assignable to type 'A1': + Types of property 'x' are incompatible: + Type '{ y: string; }' is not assignable to type '{ y: number; }': + Types of property 'y' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/multiLineErrors.ts (2 errors) ==== var t = 32; @@ -9,7 +17,7 @@ ~~~~~~~~~~~~~~ } ~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. { var x = 4; var y = 10; @@ -26,9 +34,9 @@ var t2: A2; t1 = t2; ~~ -!!! Type 'A2' is not assignable to type 'A1': -!!! Types of property 'x' are incompatible: -!!! Type '{ y: string; }' is not assignable to type '{ y: number; }': -!!! Types of property 'y' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'A2' is not assignable to type 'A1': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type '{ y: string; }' is not assignable to type '{ y: number; }': +!!! error TS2322: Types of property 'y' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt b/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt index 533cb8f2da6..d815861d7fb 100644 --- a/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt +++ b/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/multipleBaseInterfaesWithIncompatibleProperties.ts(6,11): error TS2320: Interface 'C' cannot simultaneously extend types 'A' and 'A': + Named properties 'x' of types 'A' and 'A' are not identical. + + ==== tests/cases/compiler/multipleBaseInterfaesWithIncompatibleProperties.ts (1 errors) ==== interface A { @@ -6,6 +10,6 @@ interface C extends A, A { } ~ -!!! Interface 'C' cannot simultaneously extend types 'A' and 'A': -!!! Named properties 'x' of types 'A' and 'A' are not identical. +!!! error TS2320: Interface 'C' cannot simultaneously extend types 'A' and 'A': +!!! error TS2320: Named properties 'x' of types 'A' and 'A' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/multipleClassPropertyModifiers.errors.txt b/tests/baselines/reference/multipleClassPropertyModifiers.errors.txt index 09c39bdbcca..95a4d0c16c8 100644 --- a/tests/baselines/reference/multipleClassPropertyModifiers.errors.txt +++ b/tests/baselines/reference/multipleClassPropertyModifiers.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/multipleClassPropertyModifiers.ts(3,12): error TS1029: 'public' modifier must precede 'static' modifier. +tests/cases/compiler/multipleClassPropertyModifiers.ts(5,12): error TS1029: 'private' modifier must precede 'static' modifier. + + ==== tests/cases/compiler/multipleClassPropertyModifiers.ts (2 errors) ==== class C { public static p1; static public p2; ~~~~~~ -!!! 'public' modifier must precede 'static' modifier. +!!! error TS1029: 'public' modifier must precede 'static' modifier. private static p3; static private p4; ~~~~~~~ -!!! 'private' modifier must precede 'static' modifier. +!!! error TS1029: 'private' modifier must precede 'static' modifier. } \ No newline at end of file diff --git a/tests/baselines/reference/multipleClassPropertyModifiersErrors.errors.txt b/tests/baselines/reference/multipleClassPropertyModifiersErrors.errors.txt index dd5e4af8031..7705d40e1c8 100644 --- a/tests/baselines/reference/multipleClassPropertyModifiersErrors.errors.txt +++ b/tests/baselines/reference/multipleClassPropertyModifiersErrors.errors.txt @@ -1,20 +1,27 @@ +tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(2,9): error TS1028: Accessibility modifier already seen. +tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(3,10): error TS1028: Accessibility modifier already seen. +tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(4,9): error TS1030: 'static' modifier already seen. +tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(5,9): error TS1028: Accessibility modifier already seen. +tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(6,10): error TS1028: Accessibility modifier already seen. + + ==== tests/cases/compiler/multipleClassPropertyModifiersErrors.ts (5 errors) ==== class C { public public p1; ~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. private private p2; ~~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. static static p3; ~~~~~~ -!!! 'static' modifier already seen. +!!! error TS1030: 'static' modifier already seen. public private p4; ~~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. private public p5; ~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. public static p6; private static p7; } \ No newline at end of file diff --git a/tests/baselines/reference/multipleExportAssignments.errors.txt b/tests/baselines/reference/multipleExportAssignments.errors.txt index 5f23f30c3e7..d5af20073c7 100644 --- a/tests/baselines/reference/multipleExportAssignments.errors.txt +++ b/tests/baselines/reference/multipleExportAssignments.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/multipleExportAssignments.ts(13,1): error TS2308: A module cannot have more than one export assignment. +tests/cases/compiler/multipleExportAssignments.ts(14,1): error TS2308: A module cannot have more than one export assignment. + + ==== tests/cases/compiler/multipleExportAssignments.ts (2 errors) ==== interface connectModule { (res, req, next): void; @@ -13,9 +17,9 @@ }; export = server; ~~~~~~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = connectExport; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. \ No newline at end of file diff --git a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt index 8ec47acbc68..c2475f0ff14 100644 --- a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt +++ b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt @@ -1,11 +1,15 @@ +tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(4,5): error TS2308: A module cannot have more than one export assignment. +tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(5,5): error TS2308: A module cannot have more than one export assignment. + + ==== tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts (2 errors) ==== declare module "m1" { var a: number var b: number; export = a; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = b; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. } \ No newline at end of file diff --git a/tests/baselines/reference/multipleInheritance.errors.txt b/tests/baselines/reference/multipleInheritance.errors.txt index cb3e360fcc6..b482e0a125e 100644 --- a/tests/baselines/reference/multipleInheritance.errors.txt +++ b/tests/baselines/reference/multipleInheritance.errors.txt @@ -1,3 +1,13 @@ +tests/cases/compiler/multipleInheritance.ts(9,19): error TS1005: '{' expected. +tests/cases/compiler/multipleInheritance.ts(9,24): error TS1005: ';' expected. +tests/cases/compiler/multipleInheritance.ts(18,19): error TS1005: '{' expected. +tests/cases/compiler/multipleInheritance.ts(18,24): error TS1005: ';' expected. +tests/cases/compiler/multipleInheritance.ts(34,7): error TS2416: Class 'Baad' incorrectly extends base class 'Good': + Types of property 'g' are incompatible: + Type '(n: number) => number' is not assignable to type '() => number'. +tests/cases/compiler/multipleInheritance.ts(35,12): error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. + + ==== tests/cases/compiler/multipleInheritance.ts (6 errors) ==== class B1 { public x; @@ -9,9 +19,9 @@ class C extends B1, B2 { // duplicate member ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. } class D1 extends B1 { @@ -22,9 +32,9 @@ class E extends D1, D2 { // nope, duplicate member ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. } class N { @@ -42,12 +52,12 @@ class Baad extends Good { ~~~~ -!!! Class 'Baad' incorrectly extends base class 'Good': -!!! Types of property 'g' are incompatible: -!!! Type '(n: number) => number' is not assignable to type '() => number'. +!!! error TS2416: Class 'Baad' incorrectly extends base class 'Good': +!!! error TS2416: Types of property 'g' are incompatible: +!!! error TS2416: Type '(n: number) => number' is not assignable to type '() => number'. public f(): number { return 0; } ~ -!!! Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. +!!! error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. public g(n:number) { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/multipleNumericIndexers.errors.txt b/tests/baselines/reference/multipleNumericIndexers.errors.txt index 5ee665a4703..856fdbe47ff 100644 --- a/tests/baselines/reference/multipleNumericIndexers.errors.txt +++ b/tests/baselines/reference/multipleNumericIndexers.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(5,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(10,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(15,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(20,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(25,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(28,11): error TS2428: All declarations of an interface must have identical type parameters. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(29,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(30,5): error TS2375: Duplicate number index signature. + + ==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts (8 errors) ==== // Multiple indexers of the same type are an error @@ -5,45 +15,45 @@ [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface I { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } var a: { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } var b: { [x: number]: string; [x: number]: string ~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } = { 1: '', "2": '' } class C2 { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface I { ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/multipleStringIndexers.errors.txt b/tests/baselines/reference/multipleStringIndexers.errors.txt index b6328f2edca..6aa4172476b 100644 --- a/tests/baselines/reference/multipleStringIndexers.errors.txt +++ b/tests/baselines/reference/multipleStringIndexers.errors.txt @@ -1,3 +1,11 @@ +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleStringIndexers.ts(5,5): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleStringIndexers.ts(10,5): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleStringIndexers.ts(15,5): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleStringIndexers.ts(20,5): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleStringIndexers.ts(25,5): error TS2374: Duplicate string index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleStringIndexers.ts(30,5): error TS2374: Duplicate string index signature. + + ==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleStringIndexers.ts (6 errors) ==== // Multiple indexers of the same type are an error @@ -5,40 +13,40 @@ [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface I { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } var a: { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } var b: { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } = { y: '' } class C2 { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface I2 { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/multivar.errors.txt b/tests/baselines/reference/multivar.errors.txt index 655a5f42e6d..931e61de5ae 100644 --- a/tests/baselines/reference/multivar.errors.txt +++ b/tests/baselines/reference/multivar.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/multivar.ts(6,19): error TS2395: Individual declarations in merged declaration b2 must be all exported or all local. +tests/cases/compiler/multivar.ts(22,9): error TS2395: Individual declarations in merged declaration b2 must be all exported or all local. + + ==== tests/cases/compiler/multivar.ts (2 errors) ==== var a,b,c; var x=1,y=2,z=3; @@ -6,7 +10,7 @@ export var a, b2: number = 10, b; ~~ -!!! Individual declarations in merged declaration b2 must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration b2 must be all exported or all local. var m1; var a2, b22: number = 10, b222; var m3; @@ -24,7 +28,7 @@ declare var d1, d2; var b2; ~~ -!!! Individual declarations in merged declaration b2 must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration b2 must be all exported or all local. declare var v1; } diff --git a/tests/baselines/reference/nameCollisions.errors.txt b/tests/baselines/reference/nameCollisions.errors.txt index f6ac8c0bd67..b587d842c6f 100644 --- a/tests/baselines/reference/nameCollisions.errors.txt +++ b/tests/baselines/reference/nameCollisions.errors.txt @@ -1,10 +1,21 @@ +tests/cases/compiler/nameCollisions.ts(4,12): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/nameCollisions.ts(13,9): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/nameCollisions.ts(15,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/nameCollisions.ts(25,14): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/nameCollisions.ts(28,9): error TS2300: Duplicate identifier 'f2'. +tests/cases/compiler/nameCollisions.ts(34,14): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/nameCollisions.ts(37,11): error TS2300: Duplicate identifier 'C2'. +tests/cases/compiler/nameCollisions.ts(43,15): error TS2300: Duplicate identifier 'cli'. +tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifier 'cli2'. + + ==== tests/cases/compiler/nameCollisions.ts (9 errors) ==== module T { var x = 2; module x { // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. export class Bar { test: number; } @@ -15,11 +26,11 @@ } var z; // error ~ -!!! Duplicate identifier 'z'. +!!! error TS2300: Duplicate identifier 'z'. module y { ~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged var b; } @@ -31,12 +42,12 @@ var f; function f() { } //error ~ -!!! Duplicate identifier 'f'. +!!! error TS2300: Duplicate identifier 'f'. function f2() { } var f2; // error ~~ -!!! Duplicate identifier 'f2'. +!!! error TS2300: Duplicate identifier 'f2'. var i; interface i { } //ok @@ -44,12 +55,12 @@ class C { } function C() { } // error ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. function C2() { } class C2 { } // error ~~ -!!! Duplicate identifier 'C2'. +!!! error TS2300: Duplicate identifier 'C2'. function fi() { } interface fi { } // ok @@ -57,10 +68,10 @@ class cli { } interface cli { } // error ~~~ -!!! Duplicate identifier 'cli'. +!!! error TS2300: Duplicate identifier 'cli'. interface cli2 { } class cli2 { } // error ~~~~ -!!! Duplicate identifier 'cli2'. +!!! error TS2300: Duplicate identifier 'cli2'. } \ No newline at end of file diff --git a/tests/baselines/reference/nameWithFileExtension.errors.txt b/tests/baselines/reference/nameWithFileExtension.errors.txt index 154ed8047ff..ed4a1165e7e 100644 --- a/tests/baselines/reference/nameWithFileExtension.errors.txt +++ b/tests/baselines/reference/nameWithFileExtension.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find external module './foo_0.js'. + + ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require('./foo_0.js'); ~~~~~~~~~~~~ -!!! Cannot find external module './foo_0.js'. +!!! error TS2307: Cannot find external module './foo_0.js'. var x = foo.foo + 42; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/namedFunctionExpressionCallErrors.errors.txt b/tests/baselines/reference/namedFunctionExpressionCallErrors.errors.txt index 22be4433c13..c928b002a1f 100644 --- a/tests/baselines/reference/namedFunctionExpressionCallErrors.errors.txt +++ b/tests/baselines/reference/namedFunctionExpressionCallErrors.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/namedFunctionExpressionCallErrors.ts(5,1): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/namedFunctionExpressionCallErrors.ts(12,5): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/namedFunctionExpressionCallErrors.ts(16,1): error TS2304: Cannot find name 'bar'. + + ==== tests/cases/compiler/namedFunctionExpressionCallErrors.ts (3 errors) ==== var recurser = function foo() { }; @@ -5,7 +10,7 @@ // Error: foo should not be visible here foo(); ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. // recurser should be recurser(); @@ -14,10 +19,10 @@ // Error: foo should not be visible here either foo(); ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. }); // Error: bar should not be visible bar(); ~~~ -!!! Cannot find name 'bar'. \ No newline at end of file +!!! error TS2304: Cannot find name 'bar'. \ No newline at end of file diff --git a/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt b/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt index f8dc0aeb6d8..ac59b71bbc3 100644 --- a/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt @@ -1,33 +1,45 @@ +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(4,25): error TS1005: '=' expected. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(4,26): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(12,14): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(7,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(7,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(8,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(8,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(9,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(9,29): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts (10 errors) ==== // Unary operator - // operand before - var NUMBER1 = var NUMBER-; //expect error ~~~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~ -!!! '=' expected. +!!! error TS1005: '=' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // invalid expressions var NUMBER2 = -(null - undefined); ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var NUMBER3 = -(null - null); ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var NUMBER4 = -(undefined - undefined); ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // miss operand var NUMBER =-; ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/nestedClassDeclaration.errors.txt b/tests/baselines/reference/nestedClassDeclaration.errors.txt index 1e64dad4968..f3145467231 100644 --- a/tests/baselines/reference/nestedClassDeclaration.errors.txt +++ b/tests/baselines/reference/nestedClassDeclaration.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/classes/nestedClassDeclaration.ts(5,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/classes/nestedClassDeclaration.ts(7,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/classes/nestedClassDeclaration.ts(10,5): error TS1129: Statement expected. +tests/cases/conformance/classes/nestedClassDeclaration.ts(12,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/classes/nestedClassDeclaration.ts(15,11): error TS1005: ':' expected. +tests/cases/conformance/classes/nestedClassDeclaration.ts(15,14): error TS1005: ',' expected. +tests/cases/conformance/classes/nestedClassDeclaration.ts(17,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/classes/nestedClassDeclaration.ts(15,11): error TS2304: Cannot find name 'C4'. + + ==== tests/cases/conformance/classes/nestedClassDeclaration.ts (8 errors) ==== // nested classes are not allowed @@ -5,31 +15,31 @@ x: string; class C2 { ~~~~~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. function foo() { class C3 { ~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var x = { class C4 { ~~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! Cannot find name 'C4'. +!!! error TS2304: Cannot find name 'C4'. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/newExpressionWithCast.errors.txt b/tests/baselines/reference/newExpressionWithCast.errors.txt index a7e9ef10d50..858fd81f0ee 100644 --- a/tests/baselines/reference/newExpressionWithCast.errors.txt +++ b/tests/baselines/reference/newExpressionWithCast.errors.txt @@ -1,20 +1,26 @@ +tests/cases/compiler/newExpressionWithCast.ts(8,17): error TS1109: Expression expected. +tests/cases/compiler/newExpressionWithCast.ts(4,12): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. +tests/cases/compiler/newExpressionWithCast.ts(8,13): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'void'. +tests/cases/compiler/newExpressionWithCast.ts(8,18): error TS2304: Cannot find name 'any'. + + ==== tests/cases/compiler/newExpressionWithCast.ts (4 errors) ==== function Test() { } // valid but error with noImplicitAny var test = new Test(); ~~~~~~~~~~ -!!! 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. function Test2() { } // parse error var test2 = new Test2(); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~~~~~~~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'void'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. function Test3() { } // valid with noImplicitAny diff --git a/tests/baselines/reference/newFunctionImplicitAny.errors.txt b/tests/baselines/reference/newFunctionImplicitAny.errors.txt index 2f507f61557..7aa6c150594 100644 --- a/tests/baselines/reference/newFunctionImplicitAny.errors.txt +++ b/tests/baselines/reference/newFunctionImplicitAny.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/newFunctionImplicitAny.ts(4,12): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. + + ==== tests/cases/compiler/newFunctionImplicitAny.ts (1 errors) ==== // No implicit any error given when newing a function (up for debate) function Test() { } var test = new Test(); ~~~~~~~~~~ -!!! 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. \ No newline at end of file +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/newMissingIdentifier.errors.txt b/tests/baselines/reference/newMissingIdentifier.errors.txt index 673129e5b09..fec97eb3d88 100644 --- a/tests/baselines/reference/newMissingIdentifier.errors.txt +++ b/tests/baselines/reference/newMissingIdentifier.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/newMissingIdentifier.ts(1,14): error TS1109: Expression expected. + + ==== tests/cases/compiler/newMissingIdentifier.ts (1 errors) ==== var x = new (); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/newNonReferenceType.errors.txt b/tests/baselines/reference/newNonReferenceType.errors.txt index 68761488aa7..a68eba9b9e7 100644 --- a/tests/baselines/reference/newNonReferenceType.errors.txt +++ b/tests/baselines/reference/newNonReferenceType.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/newNonReferenceType.ts(1,13): error TS2304: Cannot find name 'any'. +tests/cases/compiler/newNonReferenceType.ts(2,13): error TS2304: Cannot find name 'boolean'. + + ==== tests/cases/compiler/newNonReferenceType.ts (2 errors) ==== var a = new any(); ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. var b = new boolean(); // error ~~~~~~~ -!!! Cannot find name 'boolean'. +!!! error TS2304: Cannot find name 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/newOnInstanceSymbol.errors.txt b/tests/baselines/reference/newOnInstanceSymbol.errors.txt index 11f9e589db4..99af44524cd 100644 --- a/tests/baselines/reference/newOnInstanceSymbol.errors.txt +++ b/tests/baselines/reference/newOnInstanceSymbol.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/newOnInstanceSymbol.ts(3,1): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. + + ==== tests/cases/compiler/newOnInstanceSymbol.ts (1 errors) ==== class C {} var x = new C(); // should be ok new x(); // should error ~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file diff --git a/tests/baselines/reference/newOperator.errors.txt b/tests/baselines/reference/newOperator.errors.txt index f522ce63f85..2d3fd005448 100644 --- a/tests/baselines/reference/newOperator.errors.txt +++ b/tests/baselines/reference/newOperator.errors.txt @@ -1,9 +1,22 @@ +tests/cases/compiler/newOperator.ts(18,20): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/newOperator.ts(22,1): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/newOperator.ts(45,23): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/newOperator.ts(3,13): error TS2304: Cannot find name 'ifc'. +tests/cases/compiler/newOperator.ts(10,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/newOperator.ts(11,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/newOperator.ts(12,5): error TS2304: Cannot find name 'string'. +tests/cases/compiler/newOperator.ts(18,14): error TS2304: Cannot find name 'string'. +tests/cases/compiler/newOperator.ts(21,1): error TS2304: Cannot find name 'string'. +tests/cases/compiler/newOperator.ts(28,13): error TS2304: Cannot find name 'q'. +tests/cases/compiler/newOperator.ts(31,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. + + ==== tests/cases/compiler/newOperator.ts (11 errors) ==== interface ifc { } // Attempting to 'new' an interface yields poor error var i = new ifc(); ~~~ -!!! Cannot find name 'ifc'. +!!! error TS2304: Cannot find name 'ifc'. // Parens are optional var x = new Date; @@ -12,13 +25,13 @@ // Target is not a class or var, good error var t1 = new 53(); ~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var t2 = new ''(); ~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. new string; ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. // Use in LHS of expression? (new Date()).toString(); @@ -26,31 +39,31 @@ // Various spacing var t3 = new string[]( ); ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. var t4 = new string ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. [ ~ ] ~~~~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ( ); // Unresolved symbol var f = new q(); ~ -!!! Cannot find name 'q'. +!!! error TS2304: Cannot find name 'q'. // not legal var t5 = new new Date; ~~~~~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // Can be an expression new String; @@ -66,7 +79,7 @@ public get xs(): M.T[] { return new M.T[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. } } \ No newline at end of file diff --git a/tests/baselines/reference/newOperatorErrorCases.errors.txt b/tests/baselines/reference/newOperatorErrorCases.errors.txt index 17dd55d0ebb..8b94c902e50 100644 --- a/tests/baselines/reference/newOperatorErrorCases.errors.txt +++ b/tests/baselines/reference/newOperatorErrorCases.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/expressions/newOperator/newOperatorErrorCases.ts(27,16): error TS1005: ',' expected. +tests/cases/conformance/expressions/newOperator/newOperatorErrorCases.ts(32,23): error TS1109: Expression expected. +tests/cases/conformance/expressions/newOperator/newOperatorErrorCases.ts(32,16): error TS2304: Cannot find name 'string'. +tests/cases/conformance/expressions/newOperator/newOperatorErrorCases.ts(37,9): error TS2350: Only a void function can be called with the 'new' keyword. + + ==== tests/cases/conformance/expressions/newOperator/newOperatorErrorCases.ts (4 errors) ==== class C0 { @@ -27,21 +33,21 @@ // Construct expression with no parentheses for construct signature with > 0 parameters var b = new C0 32, ''; // Parse error ~~ -!!! ',' expected. +!!! error TS1005: ',' expected. // Generic construct expression with no parentheses var c1 = new T; var c1: T<{}>; var c2 = new T; // Parse error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. // Construct expression of non-void returning function function fnNumber(): number { return 32; } var s = new fnNumber(); // Error ~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. \ No newline at end of file diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt index 04b5ae07b64..2d322853cfe 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt @@ -1,8 +1,14 @@ +tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts(34,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts (4 errors) ==== class class1 { get a(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; @@ -14,7 +20,7 @@ } set a(val: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; @@ -28,7 +34,7 @@ class class2 { get a(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; var x2 = { doStuff: (callback) => () => { @@ -40,7 +46,7 @@ } set a(val: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; var x2 = { doStuff: (callback) => () => { diff --git a/tests/baselines/reference/noDefaultLib.errors.txt b/tests/baselines/reference/noDefaultLib.errors.txt index 2f411affd56..02098950055 100644 --- a/tests/baselines/reference/noDefaultLib.errors.txt +++ b/tests/baselines/reference/noDefaultLib.errors.txt @@ -1,12 +1,17 @@ -!!! Cannot find global type 'Boolean'. -!!! Cannot find global type 'IArguments'. +error TS2318: Cannot find global type 'Boolean'. +error TS2318: Cannot find global type 'IArguments'. +tests/cases/compiler/noDefaultLib.ts(4,11): error TS2317: Global type 'Array' must have 1 type parameter(s). + + +!!! error TS2318: Cannot find global type 'Boolean'. +!!! error TS2318: Cannot find global type 'IArguments'. ==== tests/cases/compiler/noDefaultLib.ts (1 errors) ==== /// var x; interface Array {} ~~~~~ -!!! Global type 'Array' must have 1 type parameter(s). +!!! error TS2317: Global type 'Array' must have 1 type parameter(s). interface String {} interface Number {} interface Object {} diff --git a/tests/baselines/reference/noErrorsInCallback.errors.txt b/tests/baselines/reference/noErrorsInCallback.errors.txt index cd7c4beb645..f0bfe00199e 100644 --- a/tests/baselines/reference/noErrorsInCallback.errors.txt +++ b/tests/baselines/reference/noErrorsInCallback.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/noErrorsInCallback.ts(4,19): error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'. +tests/cases/compiler/noErrorsInCallback.ts(6,23): error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/noErrorsInCallback.ts (2 errors) ==== class Bar { constructor(public foo: string) { } } var one = new Bar({}); // Error ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'. [].forEach(() => { var two = new Bar({}); // No error? ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'. }); \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyForIn.errors.txt b/tests/baselines/reference/noImplicitAnyForIn.errors.txt index 7e4122a8f26..2fb8e5a4103 100644 --- a/tests/baselines/reference/noImplicitAnyForIn.errors.txt +++ b/tests/baselines/reference/noImplicitAnyForIn.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/noImplicitAnyForIn.ts(8,18): error TS7017: Index signature of object type implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyForIn.ts(15,18): error TS7017: Index signature of object type implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyForIn.ts(21,9): error TS7005: Variable 'b' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyForIn.ts(29,5): error TS7005: Variable 'n' implicitly has an 'any[][]' type. +tests/cases/compiler/noImplicitAnyForIn.ts(31,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. + + ==== tests/cases/compiler/noImplicitAnyForIn.ts (5 errors) ==== var x: {}[] = [[1, 2, 3], ["hello"]]; @@ -8,7 +15,7 @@ //Should yield an implicit 'any' error var _j = x[i][j]; ~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. } for (var k in x[0]) { @@ -17,7 +24,7 @@ //Should yield an implicit 'any' error var k2 = k1[k]; ~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. } } @@ -25,7 +32,7 @@ // Should yield an implicit 'any' error. var b; ~ -!!! Variable 'b' implicitly has an 'any' type. +!!! error TS7005: Variable 'b' implicitly has an 'any' type. var c = a || b; } @@ -35,8 +42,8 @@ // Should yield an implicit 'any' error. var n = [[]] || []; ~ -!!! Variable 'n' implicitly has an 'any[][]' type. +!!! error TS7005: Variable 'n' implicitly has an 'any[][]' type. for (n[idx++] in m); ~~~~~~~~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. \ No newline at end of file +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt b/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt index 622914ea419..176f40f16f3 100644 --- a/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt +++ b/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/noImplicitAnyForMethodParameters.ts(6,5): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyForMethodParameters.ts(6,16): error TS7006: Parameter 'a' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyForMethodParameters.ts(10,17): error TS7006: Parameter 'a' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyForMethodParameters.ts(13,16): error TS7006: Parameter 'a' implicitly has an 'any' type. + + ==== tests/cases/compiler/noImplicitAnyForMethodParameters.ts (4 errors) ==== declare class A { private foo(a); // OK - ambient class and private method - no error @@ -6,18 +12,18 @@ declare class B { public foo(a); // OK - ambient class and public method - error ~~~~~~~~~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. } class C { private foo(a) { } // OK - non-ambient class and private method - error ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. } class D { public foo(a) { } // OK - non-ambient class and public method - error ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyForwardReferencedInterface.errors.txt b/tests/baselines/reference/noImplicitAnyForwardReferencedInterface.errors.txt index 7d02a125569..177d2d66bfe 100644 --- a/tests/baselines/reference/noImplicitAnyForwardReferencedInterface.errors.txt +++ b/tests/baselines/reference/noImplicitAnyForwardReferencedInterface.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/noImplicitAnyForwardReferencedInterface.ts(5,5): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/noImplicitAnyForwardReferencedInterface.ts (1 errors) ==== declare var x: Entry; @@ -5,5 +8,5 @@ // Should return error for implicit any. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyFunctionExpressionAssignment.errors.txt b/tests/baselines/reference/noImplicitAnyFunctionExpressionAssignment.errors.txt index 89c4ffe6ac7..d53f12fd504 100644 --- a/tests/baselines/reference/noImplicitAnyFunctionExpressionAssignment.errors.txt +++ b/tests/baselines/reference/noImplicitAnyFunctionExpressionAssignment.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/noImplicitAnyFunctionExpressionAssignment.ts(2,27): error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyFunctionExpressionAssignment.ts(6,28): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/noImplicitAnyFunctionExpressionAssignment.ts (2 errors) ==== var x: (a: any) => void = function (x: T) { @@ -6,7 +10,7 @@ ~~~~~~~~~~~~~~~~ }; ~ -!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. var x2: (a: any) => void = function f(x: T) { ~~~~~~~~~~~~~~~~~~~~~ @@ -14,4 +18,4 @@ ~~~~~~~~~~~~~~~~ }; ~ -!!! 'f', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file +!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyFunctions.errors.txt b/tests/baselines/reference/noImplicitAnyFunctions.errors.txt index a3768a1c7a5..622dd953150 100644 --- a/tests/baselines/reference/noImplicitAnyFunctions.errors.txt +++ b/tests/baselines/reference/noImplicitAnyFunctions.errors.txt @@ -1,14 +1,21 @@ +tests/cases/compiler/noImplicitAnyFunctions.ts(2,1): error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyFunctions.ts(6,13): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyFunctions.ts(17,1): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyFunctions.ts(19,1): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyFunctions.ts(19,24): error TS7006: Parameter 'y' implicitly has an 'any' type. + + ==== tests/cases/compiler/noImplicitAnyFunctions.ts (5 errors) ==== declare function f1(); ~~~~~~~~~~~~~~~~~~~~~~ -!!! 'f1', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type. declare function f2(): any; function f3(x) { ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. } function f4(x: any) { @@ -21,14 +28,14 @@ function f6(x: string, y: number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'f6', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. function f6(x: string, y: string): any; function f6(x: string, y) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. return null; ~~~~~~~~~~~~~~~~ } ~ -!!! 'f6', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file +!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyInBareInterface.errors.txt b/tests/baselines/reference/noImplicitAnyInBareInterface.errors.txt index f96c1b98827..eb379c67026 100644 --- a/tests/baselines/reference/noImplicitAnyInBareInterface.errors.txt +++ b/tests/baselines/reference/noImplicitAnyInBareInterface.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/noImplicitAnyInBareInterface.ts(4,5): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyInBareInterface.ts(6,5): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/noImplicitAnyInBareInterface.ts (2 errors) ==== interface Entry { // Should return error for implicit any on `new` and `foo`. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. few() : any; foo(); ~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt index bc7542df511..ac52b2365ee 100644 --- a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/noImplicitAnyInCastExpression.ts(16,2): error TS2353: Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other: + Property 'a' is missing in type '{ c: null; }'. + + ==== tests/cases/compiler/noImplicitAnyInCastExpression.ts (1 errors) ==== // verify no noImplictAny errors reported with cast expression @@ -16,5 +20,5 @@ // Neither types is assignable to each other ({ c: null }); ~~~~~~~~~~~~~~~~~ -!!! Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other: -!!! Property 'a' is missing in type '{ c: null; }'. \ No newline at end of file +!!! error TS2353: Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other: +!!! error TS2353: Property 'a' is missing in type '{ c: null; }'. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyIndexing.errors.txt b/tests/baselines/reference/noImplicitAnyIndexing.errors.txt index 857809c3e84..8b75459ebd0 100644 --- a/tests/baselines/reference/noImplicitAnyIndexing.errors.txt +++ b/tests/baselines/reference/noImplicitAnyIndexing.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/noImplicitAnyIndexing.ts(13,26): error TS7017: Index signature of object type implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyIndexing.ts(20,9): error TS7017: Index signature of object type implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyIndexing.ts(23,9): error TS7017: Index signature of object type implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyIndexing.ts(31,10): error TS7017: Index signature of object type implicitly has an 'any' type. + + ==== tests/cases/compiler/noImplicitAnyIndexing.ts (4 errors) ==== enum MyEmusEnum { @@ -13,7 +19,7 @@ // Should be implicit 'any' ; property access fails, no string indexer. var strRepresentation3 = MyEmusEnum["monehh"]; ~~~~~~~~~~~~~~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. // Should be okay; should be a MyEmusEnum var strRepresentation4 = MyEmusEnum["emu"]; @@ -22,12 +28,12 @@ // Should report an implicit 'any'. var x = {}["hi"]; ~~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. // Should report an implicit 'any'. var y = {}[10]; ~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. var hi: any = "hi"; @@ -37,7 +43,7 @@ // Should report an implicit 'any'. var z1 = emptyObj[hi]; ~~~~~~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. var z2 = (emptyObj)[hi]; interface MyMap { diff --git a/tests/baselines/reference/noImplicitAnyModule.errors.txt b/tests/baselines/reference/noImplicitAnyModule.errors.txt index 81e07fad9cb..ec1af2346cc 100644 --- a/tests/baselines/reference/noImplicitAnyModule.errors.txt +++ b/tests/baselines/reference/noImplicitAnyModule.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/noImplicitAnyModule.ts(5,9): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyModule.ts(10,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyModule.ts(11,9): error TS7010: 'g', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyModule.ts(18,5): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/noImplicitAnyModule.ts (4 errors) ==== declare module Module { @@ -5,17 +11,17 @@ // Should return error for implicit any on return type. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. } class Class { // Should return error for implicit `any` on parameter. public f(x): any; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. public g(x: any); ~~~~~~~~~~~~~~~~~ -!!! 'g', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'g', which lacks return-type annotation, implicitly has an 'any' return type. // Should not return error at all. private h(x); @@ -24,6 +30,6 @@ // Should return error for implicit any on return type. function f(x: number); ~~~~~~~~~~~~~~~~~~~~~~ -!!! 'f', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInAmbientClass.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInAmbientClass.errors.txt index d81e3e38404..a2ac9467856 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInAmbientClass.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInAmbientClass.errors.txt @@ -1,3 +1,36 @@ +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(7,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(13,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(13,22): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(13,25): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(16,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(16,30): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(19,19): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(22,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(22,22): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(25,19): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(26,31): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(27,19): error TS7006: Parameter 'x3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(27,23): error TS7006: Parameter 'y3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(33,22): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(36,22): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(36,25): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(36,28): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(39,22): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(39,33): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(42,22): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(45,22): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(45,25): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(79,24): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(82,24): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(82,27): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(82,30): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(85,24): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(85,35): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(88,24): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(91,24): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts(91,27): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. + + ==== tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts (31 errors) ==== declare class D_C { @@ -7,7 +40,7 @@ // Implicit-'any' errors for x. public pub_f2(x): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. public pub_f3(x: any): void; @@ -15,43 +48,43 @@ // Implicit-'any' errors for x, y, and z. public pub_f4(x, y, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. public pub_f5(x, y: any, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. public pub_f6(...r): void; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. public pub_f7(x, ...r): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. public pub_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. public pub_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. public pub_f8(x3, y3): any; ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. public pub_f9: () => string; @@ -59,35 +92,35 @@ // Implicit-'any' error for x. public pub_f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. public pub_f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. public pub_f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. public pub_f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. public pub_f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. /////////////////////////////////////////// @@ -123,33 +156,33 @@ // Implicit-'any' error for x. private priv_f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. private priv_f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. private priv_f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. private priv_f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. private priv_f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInAmbientFunctions.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInAmbientFunctions.errors.txt index 905ea1ac9f0..37af83d7891 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInAmbientFunctions.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInAmbientFunctions.errors.txt @@ -1,3 +1,27 @@ +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(6,23): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(12,23): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(12,26): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(12,29): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(15,23): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(15,34): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(18,23): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(21,23): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(21,26): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(24,23): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(25,35): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(26,23): error TS7006: Parameter 'x3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(26,27): error TS7006: Parameter 'y3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(32,21): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(35,21): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(35,24): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(35,27): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(38,21): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(38,32): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(41,21): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(44,21): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts(44,24): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. + + ==== tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts (22 errors) ==== // No implicit-'any' errors. @@ -6,7 +30,7 @@ // Implicit-'any' errors for x. declare function d_f2(x): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. declare function d_f3(x: any): void; @@ -14,43 +38,43 @@ // Implicit-'any' errors for x, y, and z. declare function d_f4(x, y, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. declare function d_f5(x, y: any, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. declare function d_f6(...r): void; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. declare function d_f7(x, ...r): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. declare function d_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. declare function d_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. declare function d_f8(x3, y3): any; ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. declare var d_f9: () => string; @@ -58,32 +82,32 @@ // Implicit-'any' error for x. declare var d_f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. declare var d_f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. declare var d_f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. declare var d_f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. declare var d_f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. \ No newline at end of file +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInAmbientModule.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInAmbientModule.errors.txt index 99779ab7697..7bdfbcaae88 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInAmbientModule.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInAmbientModule.errors.txt @@ -1,3 +1,27 @@ +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(7,20): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(13,20): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(13,23): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(13,26): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(16,20): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(16,31): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(19,20): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(22,20): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(22,23): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(25,20): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(26,32): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(27,20): error TS7006: Parameter 'x3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(27,24): error TS7006: Parameter 'y3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(33,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(36,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(36,21): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(36,24): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(39,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(39,29): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(42,18): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(45,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts(45,21): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. + + ==== tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts (22 errors) ==== declare module D_M { @@ -7,7 +31,7 @@ // No implicit-'any' errors. function dm_f2(x): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. function dm_f3(x: any): void; @@ -15,43 +39,43 @@ // No implicit-'any' errors. function dm_f4(x, y, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // No implicit-'any' errors. function dm_f5(x, y: any, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // No implicit-'any' errors. function dm_f6(...r): void; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // No implicit-'any' errors. function dm_f7(x, ...r): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // No implicit-'any' errors. function dm_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. function dm_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. function dm_f8(x3, y3): any; ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. var dm_f9: () => string; @@ -59,33 +83,33 @@ // No implicit-'any' errors. var dm_f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. var dm_f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // No implicit-'any' errors. var dm_f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // No implicit-'any' errors. var dm_f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // No implicit-'any' errors. var dm_f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.errors.txt index ed49e1dbd11..3d3cc1aa5ea 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.errors.txt @@ -1,3 +1,27 @@ +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(6,13): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(12,13): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(12,16): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(12,19): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(15,13): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(15,24): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(18,13): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(21,13): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(21,16): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(24,13): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(25,25): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(26,13): error TS7006: Parameter 'x3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(26,17): error TS7006: Parameter 'y3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(32,12): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(35,12): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(35,15): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(35,18): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(38,12): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(38,23): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(41,12): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(44,12): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts(44,15): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. + + ==== tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts (22 errors) ==== // No implicit-'any' errors. @@ -6,7 +30,7 @@ // Implicit-'any' error for x. function f2(x): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. function f3(x: any): void { } @@ -14,43 +38,43 @@ // Implicit-'any' errors for x, y, and z. function f4(x, y, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. function f5(x, y: any, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. function f6(...r): void { } ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. function f7(x, ...r): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. function f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. function f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. function f8(x3, y3): any { } ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. var f9 = () => ""; @@ -58,32 +82,32 @@ // Implicit-'any' errors for x. var f10 = (x) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. var f11 = (x, y, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. var f12 = (x, y: any, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. var f13 = (...r) => ""; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. var f14 = (x, ...r) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. \ No newline at end of file +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInClass.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInClass.errors.txt index 785ebe83b87..98d743a21aa 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInClass.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInClass.errors.txt @@ -1,3 +1,49 @@ +tests/cases/compiler/noImplicitAnyParametersInClass.ts(7,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(13,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(13,22): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(13,25): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(16,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(16,30): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(19,19): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(22,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(22,22): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(25,19): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(26,31): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(27,19): error TS7006: Parameter 'x3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(27,23): error TS7006: Parameter 'y3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(33,23): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(36,23): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(36,26): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(36,29): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(39,23): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(39,34): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(42,23): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(45,23): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(45,26): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(53,21): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(59,21): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(59,24): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(59,27): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(62,21): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(62,32): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(65,21): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(68,21): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(68,24): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(71,21): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(72,33): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(73,21): error TS7006: Parameter 'x3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(73,25): error TS7006: Parameter 'y3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(79,25): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(82,25): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(82,28): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(82,31): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(85,25): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(85,36): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(88,25): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(91,25): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInClass.ts(91,28): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. + + ==== tests/cases/compiler/noImplicitAnyParametersInClass.ts (44 errors) ==== class C { @@ -7,7 +53,7 @@ // Implicit-'any' errors for x. public pub_f2(x): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. public pub_f3(x: any): void { } @@ -15,43 +61,43 @@ // Implicit-'any' errors for x, y, and z. public pub_f4(x, y, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. public pub_f5(x, y: any, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. public pub_f6(...r): void { } ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. public pub_f7(x, ...r): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. public pub_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. public pub_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. public pub_f8(x3, y3): any { } ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. public pub_f9 = () => ""; @@ -59,35 +105,35 @@ // Implicit-'any' errors for x. public pub_f10 = (x) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. public pub_f11 = (x, y, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. public pub_f12 = (x, y: any, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. public pub_f13 = (...r) => ""; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. public pub_f14 = (x, ...r) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. /////////////////////////////////////////// @@ -97,7 +143,7 @@ // Implicit-'any' errors for x. private priv_f2(x): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. private priv_f3(x: any): void { } @@ -105,43 +151,43 @@ // Implicit-'any' errors for x, y, and z. private priv_f4(x, y, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. private priv_f5(x, y: any, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. private priv_f6(...r): void { } ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. private priv_f7(x, ...r): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. private priv_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. private priv_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. private priv_f8(x3, y3): any { } ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. private priv_f9 = () => ""; @@ -149,33 +195,33 @@ // Implicit-'any' errors for x. private priv_f10 = (x) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. private priv_f11 = (x, y, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. private priv_f12 = (x, y: any, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. private priv_f13 = (...r) => ""; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. private priv_f14 = (x, ...r) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInInterface.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInInterface.errors.txt index c9bece57671..f0b9fad3b33 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInInterface.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInInterface.errors.txt @@ -1,20 +1,49 @@ +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(4,5): error TS7020: Call signature, which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(5,5): error TS7020: Call signature, which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(5,6): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(6,6): error TS7006: Parameter 'x2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(6,22): error TS7006: Parameter 'z2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(12,8): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(18,8): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(18,11): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(18,14): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(21,8): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(21,19): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(24,8): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(27,8): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(27,11): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(30,8): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(31,20): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(32,8): error TS7006: Parameter 'x3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(32,12): error TS7006: Parameter 'y3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(38,11): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(41,11): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(41,14): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(41,17): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(44,11): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(44,22): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(47,11): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(50,11): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInInterface.ts(50,14): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. + + ==== tests/cases/compiler/noImplicitAnyParametersInInterface.ts (27 errors) ==== interface I { // Implicit-'any' errors for first two call signatures, x1, x2, z2. (); ~~~ -!!! Call signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7020: Call signature, which lacks return-type annotation, implicitly has an 'any' return type. (x1); ~~~~~ -!!! Call signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7020: Call signature, which lacks return-type annotation, implicitly has an 'any' return type. ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. (x2, y2: string, z2): any; ~~ -!!! Parameter 'x2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x2' implicitly has an 'any' type. ~~ -!!! Parameter 'z2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z2' implicitly has an 'any' type. // No implicit-'any' errors. f1(): void; @@ -22,7 +51,7 @@ // Implicit-'any' errors for x. f2(x): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. f3(x: any): void; @@ -30,43 +59,43 @@ // Implicit-'any' errors for x, y, and z. f4(x, y, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. f5(x, y: any, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. f6(...r): void; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. f7(x, ...r): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. f8(x3, y3): any; ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. f9: () => string; @@ -74,33 +103,33 @@ // Implicit-'any' errors for x. f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInModule.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInModule.errors.txt index 87912f0dcfa..8bddee624c5 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInModule.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInModule.errors.txt @@ -1,3 +1,27 @@ +tests/cases/compiler/noImplicitAnyParametersInModule.ts(7,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(13,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(13,22): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(13,25): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(16,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(16,30): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(19,19): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(22,19): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(22,22): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(25,19): error TS7006: Parameter 'x1' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(26,31): error TS7006: Parameter 'y2' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(27,19): error TS7006: Parameter 'x3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(27,23): error TS7006: Parameter 'y3' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(33,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(36,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(36,21): error TS7006: Parameter 'y' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(36,24): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(39,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(39,29): error TS7006: Parameter 'z' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(42,18): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(45,18): error TS7006: Parameter 'x' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyParametersInModule.ts(45,21): error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. + + ==== tests/cases/compiler/noImplicitAnyParametersInModule.ts (22 errors) ==== module M { @@ -7,7 +31,7 @@ // Implicit-'any' error for x. function m_f2(x): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. function m_f3(x: any): void { } @@ -15,43 +39,43 @@ // Implicit-'any' errors for x, y, and z. function m_f4(x, y, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. function m_f5(x, y: any, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. function m_f6(...r): void { } ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x and r. function m_f7(x, ...r): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. function m_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. function m_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. function m_f8(x3, y3): any { } ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. var m_f9 = () => ""; @@ -59,33 +83,33 @@ // Implicit-'any' error for x. var m_f10 = (x) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. var m_f11 = (x, y, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. var m_f12 = (x, y: any, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. var m_f13 = (...r) => ""; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x and r. var m_f14 = (x, ...r) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyReferencingDeclaredInterface.errors.txt b/tests/baselines/reference/noImplicitAnyReferencingDeclaredInterface.errors.txt index b3dce9b2f77..d782e05ca61 100644 --- a/tests/baselines/reference/noImplicitAnyReferencingDeclaredInterface.errors.txt +++ b/tests/baselines/reference/noImplicitAnyReferencingDeclaredInterface.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/noImplicitAnyReferencingDeclaredInterface.ts(4,5): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. + + ==== tests/cases/compiler/noImplicitAnyReferencingDeclaredInterface.ts (1 errors) ==== interface Entry { // Should return error for implicit any. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. } declare var x: Entry; \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt index c19ff9f396e..5c0878f8ab9 100644 --- a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt +++ b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(2,9): error TS7017: Index signature of object type implicitly has an 'any' type. + + ==== tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts (1 errors) ==== var x = {}["hello"]; ~~~~~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. \ No newline at end of file +!!! error TS7017: Index signature of object type implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt b/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt index 490d3e41cfb..21845261f35 100644 --- a/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt +++ b/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt @@ -1,18 +1,24 @@ +tests/cases/compiler/noImplicitAnyWithOverloads.ts(2,5): error TS7008: Member 'foo' implicitly has an 'any' type. +tests/cases/compiler/noImplicitAnyWithOverloads.ts(6,1): error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyWithOverloads.ts(7,1): error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. +tests/cases/compiler/noImplicitAnyWithOverloads.ts(8,16): error TS7006: Parameter 'a' implicitly has an 'any' type. + + ==== tests/cases/compiler/noImplicitAnyWithOverloads.ts (4 errors) ==== interface A { foo; ~~~~ -!!! Member 'foo' implicitly has an 'any' type. +!!! error TS7008: Member 'foo' implicitly has an 'any' type. } interface B { } function callb(lam: (l: A) => void); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'callb', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. function callb(lam: (n: B) => void); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'callb', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. function callb(a) { } ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. callb((a) => { a.foo; }); // error, chose first overload \ No newline at end of file diff --git a/tests/baselines/reference/noTypeArgumentOnReturnType1.errors.txt b/tests/baselines/reference/noTypeArgumentOnReturnType1.errors.txt index 949364d138b..4800ccf3c17 100644 --- a/tests/baselines/reference/noTypeArgumentOnReturnType1.errors.txt +++ b/tests/baselines/reference/noTypeArgumentOnReturnType1.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/noTypeArgumentOnReturnType1.ts(3,9): error TS2314: Generic type 'A' requires 1 type argument(s). + + ==== tests/cases/compiler/noTypeArgumentOnReturnType1.ts (1 errors) ==== class A{ foo(): A{ ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). return null; } } \ No newline at end of file diff --git a/tests/baselines/reference/nonArrayRestArgs.errors.txt b/tests/baselines/reference/nonArrayRestArgs.errors.txt index 7262e0a92a7..b25b5296b35 100644 --- a/tests/baselines/reference/nonArrayRestArgs.errors.txt +++ b/tests/baselines/reference/nonArrayRestArgs.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/nonArrayRestArgs.ts(1,14): error TS2370: A rest parameter must be of an array type. + + ==== tests/cases/compiler/nonArrayRestArgs.ts (1 errors) ==== function foo(...rest: number) { // error ~~~~~~~~~~~~~~~ -!!! A rest parameter must be of an array type. +!!! error TS2370: A rest parameter must be of an array type. var x: string = rest[0]; return x; } \ No newline at end of file diff --git a/tests/baselines/reference/nonContextuallyTypedLogicalOr.errors.txt b/tests/baselines/reference/nonContextuallyTypedLogicalOr.errors.txt index e7d301b6edc..ca4dc9f67e3 100644 --- a/tests/baselines/reference/nonContextuallyTypedLogicalOr.errors.txt +++ b/tests/baselines/reference/nonContextuallyTypedLogicalOr.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/nonContextuallyTypedLogicalOr.ts(16,10): error TS2339: Property 'dummy' does not exist on type '{}'. + + ==== tests/cases/compiler/nonContextuallyTypedLogicalOr.ts (1 errors) ==== interface Contextual { dummy; @@ -16,4 +19,4 @@ // needs to be a supertype of the LHS to win as the best common type. (c || e).dummy; ~~~~~ -!!! Property 'dummy' does not exist on type '{}'. \ No newline at end of file +!!! error TS2339: Property 'dummy' does not exist on type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/nonExportedElementsOfMergedModules.errors.txt b/tests/baselines/reference/nonExportedElementsOfMergedModules.errors.txt index f4f1fe043e7..18f9f3bc8d4 100644 --- a/tests/baselines/reference/nonExportedElementsOfMergedModules.errors.txt +++ b/tests/baselines/reference/nonExportedElementsOfMergedModules.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/nonExportedElementsOfMergedModules.ts(13,7): error TS2339: Property 'x' does not exist on type 'typeof B'. + + ==== tests/cases/compiler/nonExportedElementsOfMergedModules.ts (1 errors) ==== module One { enum A { X } @@ -13,7 +16,7 @@ } B.x; ~ -!!! Property 'x' does not exist on type 'typeof B'. +!!! error TS2339: Property 'x' does not exist on type 'typeof B'. B.y; } \ No newline at end of file diff --git a/tests/baselines/reference/nullAssignedToUndefined.errors.txt b/tests/baselines/reference/nullAssignedToUndefined.errors.txt index 964fec0d3bf..5f9921b5809 100644 --- a/tests/baselines/reference/nullAssignedToUndefined.errors.txt +++ b/tests/baselines/reference/nullAssignedToUndefined.errors.txt @@ -1,5 +1,8 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignedToUndefined.ts(1,9): error TS2364: Invalid left-hand side of assignment expression. + + ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignedToUndefined.ts (1 errors) ==== var x = undefined = null; // error ~~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. var y: typeof undefined = null; // ok, widened \ No newline at end of file diff --git a/tests/baselines/reference/nullKeyword.errors.txt b/tests/baselines/reference/nullKeyword.errors.txt index ab3616d7772..a140fce0b0f 100644 --- a/tests/baselines/reference/nullKeyword.errors.txt +++ b/tests/baselines/reference/nullKeyword.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/nullKeyword.ts(1,6): error TS2339: Property 'foo' does not exist on type 'null'. + + ==== tests/cases/compiler/nullKeyword.ts (1 errors) ==== null.foo; ~~~ -!!! Property 'foo' does not exist on type 'null'. \ No newline at end of file +!!! error TS2339: Property 'foo' does not exist on type 'null'. \ No newline at end of file diff --git a/tests/baselines/reference/numLit.errors.txt b/tests/baselines/reference/numLit.errors.txt index 97c80e65677..98b84791e35 100644 --- a/tests/baselines/reference/numLit.errors.txt +++ b/tests/baselines/reference/numLit.errors.txt @@ -1,9 +1,13 @@ +tests/cases/compiler/numLit.ts(3,3): error TS1005: ';' expected. +tests/cases/compiler/numLit.ts(3,3): error TS2304: Cannot find name 'toString'. + + ==== tests/cases/compiler/numLit.ts (2 errors) ==== 1..toString(); 1.0.toString(); 1.toString(); ~~~~~~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~ -!!! Cannot find name 'toString'. +!!! error TS2304: Cannot find name 'toString'. 1.+2.0 + 3. ; \ No newline at end of file diff --git a/tests/baselines/reference/numberToString.errors.txt b/tests/baselines/reference/numberToString.errors.txt index 5d7a636f5f1..d703632d18b 100644 --- a/tests/baselines/reference/numberToString.errors.txt +++ b/tests/baselines/reference/numberToString.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/numberToString.ts(2,12): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numberToString.ts(9,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/numberToString.ts (2 errors) ==== function f1(n:number):string { return n; // error return type mismatch ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. } function f2(s:string):void { @@ -11,6 +15,6 @@ f1(3); f2(3); // error no coercion to string ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. f2(3+""); // ok + operator promotes \ No newline at end of file diff --git a/tests/baselines/reference/numericClassMembers1.errors.txt b/tests/baselines/reference/numericClassMembers1.errors.txt index 160c6e88207..28c06a6fcf5 100644 --- a/tests/baselines/reference/numericClassMembers1.errors.txt +++ b/tests/baselines/reference/numericClassMembers1.errors.txt @@ -1,16 +1,20 @@ +tests/cases/compiler/numericClassMembers1.ts(3,3): error TS2300: Duplicate identifier '0.0'. +tests/cases/compiler/numericClassMembers1.ts(8,2): error TS2300: Duplicate identifier ''0''. + + ==== tests/cases/compiler/numericClassMembers1.ts (2 errors) ==== class C234 { 0 = 1; 0.0 = 2; ~~~ -!!! Duplicate identifier '0.0'. +!!! error TS2300: Duplicate identifier '0.0'. } class C235 { 0.0 = 1; '0' = 2; ~~~ -!!! Duplicate identifier ''0''. +!!! error TS2300: Duplicate identifier ''0''. } class C236 { diff --git a/tests/baselines/reference/numericIndexExpressions.errors.txt b/tests/baselines/reference/numericIndexExpressions.errors.txt index b471b45c7dd..5832cca76c6 100644 --- a/tests/baselines/reference/numericIndexExpressions.errors.txt +++ b/tests/baselines/reference/numericIndexExpressions.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/numericIndexExpressions.ts(10,1): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numericIndexExpressions.ts(11,1): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numericIndexExpressions.ts(14,1): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/numericIndexExpressions.ts(15,1): error TS2323: Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/numericIndexExpressions.ts (4 errors) ==== interface Numbers1 { 1: string; @@ -10,15 +16,15 @@ var x: Numbers1; x[1] = 4; // error ~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. x['1'] = 4; // error ~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var y: Strings1; y['1'] = 4; // should be error ~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. y[1] = 4; // should be error ~~~~ -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt index 1a74ee37809..fd23cab9956 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt @@ -1,3 +1,21 @@ +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(36,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(90,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(93,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(18,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(20,5): error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(21,5): error TS2412: Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(50,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(55,5): error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(68,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(73,5): error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: unknown; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }': + Index signatures are incompatible: + Type '{}' is not assignable to type 'string'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(88,9): error TS2304: Cannot find name 'Myn'. + + ==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts (14 errors) ==== // String indexer types constrain the types of named properties in their containing type @@ -18,23 +36,23 @@ 1.0: string; // ok 2.0: number; // error ~~~~~~~~~~~~ -!!! Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. "3.0": string; // ok "4.0": number; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. 3.0: MyNumber // error ~~~~~~~~~~~~~ -!!! Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'. get X() { // ok ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } set X(v) { } // ok ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { return ''; @@ -46,7 +64,7 @@ static foo() { } // ok static get X() { // ok ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } } @@ -62,14 +80,14 @@ 1.0: string; // ok 2.0: number; // error ~~~~~~~~~~~~ -!!! Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. (): string; // ok (x): number // ok foo(): string; // ok "3.0": string; // ok "4.0": number; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. f: MyNumber; // error } @@ -84,23 +102,23 @@ 1.0: string; // ok 2.0: number; // error ~~~~~~~~~~~~ -!!! Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. (): string; // ok (x): number // ok foo(): string; // ok "3.0": string; // ok "4.0": number; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. f: MyNumber; // error } // error var b: { [x: number]: string; } = { ~ -!!! Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: unknown; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }': -!!! Index signatures are incompatible: -!!! Type '{}' is not assignable to type 'string'. +!!! error TS2322: Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: unknown; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type '{}' is not assignable to type 'string'. a: '', b: 1, c: () => { }, @@ -112,16 +130,16 @@ "4.0": 1, f: null, ~~~ -!!! Cannot find name 'Myn'. +!!! error TS2304: Cannot find name 'Myn'. get X() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; }, set X(v) { }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { return ''; } diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt index 3c211326180..0e9cff15560 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt @@ -1,3 +1,15 @@ +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(16,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(17,5): error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(25,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(26,5): error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(34,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(35,5): error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(39,5): error TS2322: Type '{ [x: number]: {}; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }': + Index signatures are incompatible: + Type '{}' is not assignable to type 'A': + Property 'foo' is missing in type '{}'. + + ==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts (7 errors) ==== // String indexer providing a constraint of a user defined type @@ -16,10 +28,10 @@ "2.5": B // ok 3.0: number; // error ~~~~~~~~~~~~ -!!! Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. "4.0": string; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. } interface Foo2 { @@ -29,10 +41,10 @@ "2.5": B // ok 3.0: number; // error ~~~~~~~~~~~~ -!!! Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. "4.0": string; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. } var a: { @@ -42,19 +54,19 @@ "2.5": B // ok 3.0: number; // error ~~~~~~~~~~~~ -!!! Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. "4.0": string; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. }; // error var b: { [x: number]: A } = { ~ -!!! Type '{ [x: number]: {}; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }': -!!! Index signatures are incompatible: -!!! Type '{}' is not assignable to type 'A': -!!! Property 'foo' is missing in type '{}'. +!!! error TS2322: Type '{ [x: number]: {}; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type '{}' is not assignable to type 'A': +!!! error TS2322: Property 'foo' is missing in type '{}'. 1.0: new A(), 2.0: new B(), "2.5": new B(), diff --git a/tests/baselines/reference/numericIndexerConstraint.errors.txt b/tests/baselines/reference/numericIndexerConstraint.errors.txt index 4ff9b00897e..af24643310a 100644 --- a/tests/baselines/reference/numericIndexerConstraint.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/numericIndexerConstraint.ts(2,5): error TS2412: Property '0' of type 'number' is not assignable to numeric index type 'RegExp'. + + ==== tests/cases/compiler/numericIndexerConstraint.ts (1 errors) ==== class C { 0: number; ~~~~~~~~~~ -!!! Property '0' of type 'number' is not assignable to numeric index type 'RegExp'. +!!! error TS2412: Property '0' of type 'number' is not assignable to numeric index type 'RegExp'. [x: number]: RegExp; } \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint1.errors.txt b/tests/baselines/reference/numericIndexerConstraint1.errors.txt index 8d615874e4d..cd800042c4b 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint1.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2322: Type 'number' is not assignable to type 'Foo': + Property 'foo' is missing in type 'Number'. + + ==== tests/cases/compiler/numericIndexerConstraint1.ts (1 errors) ==== class Foo { foo() { } } var x: { [index: string]: number; }; var result: Foo = x["one"]; // error ~~~~~~ -!!! Type 'number' is not assignable to type 'Foo': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Foo': +!!! error TS2322: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint2.errors.txt b/tests/baselines/reference/numericIndexerConstraint2.errors.txt index 1bd9aea28d1..b31688ca349 100644 --- a/tests/baselines/reference/numericIndexerConstraint2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint2.errors.txt @@ -1,8 +1,12 @@ +tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }': + Index signature is missing in type '{ one: number; }'. + + ==== tests/cases/compiler/numericIndexerConstraint2.ts (1 errors) ==== class Foo { foo() { } } var x: { [index: string]: Foo; }; var a: { one: number; }; x = a; ~ -!!! Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }': -!!! Index signature is missing in type '{ one: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }': +!!! error TS2322: Index signature is missing in type '{ one: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint5.errors.txt b/tests/baselines/reference/numericIndexerConstraint5.errors.txt index 9127b58360e..4cccdf0d30b 100644 --- a/tests/baselines/reference/numericIndexerConstraint5.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint5.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }': + Index signature is missing in type '{ 0: Date; name: string; }'. + + ==== tests/cases/compiler/numericIndexerConstraint5.ts (1 errors) ==== var x = { name: "x", 0: new Date() }; var z: { [name: number]: string } = x; ~ -!!! Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }': -!!! Index signature is missing in type '{ 0: Date; name: string; }'. \ No newline at end of file +!!! error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }': +!!! error TS2322: Index signature is missing in type '{ 0: Date; name: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerTyping1.errors.txt b/tests/baselines/reference/numericIndexerTyping1.errors.txt index 5aa0c794357..2c5217bf5c6 100644 --- a/tests/baselines/reference/numericIndexerTyping1.errors.txt +++ b/tests/baselines/reference/numericIndexerTyping1.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/numericIndexerTyping1.ts(9,5): error TS2323: Type 'Date' is not assignable to type 'string'. +tests/cases/compiler/numericIndexerTyping1.ts(12,5): error TS2323: Type 'Date' is not assignable to type 'string'. + + ==== tests/cases/compiler/numericIndexerTyping1.ts (2 errors) ==== interface I { [x: string]: Date; @@ -9,9 +13,9 @@ var i: I; var r: string = i[1]; // error: numeric indexer returns the type of the string indexer ~ -!!! Type 'Date' is not assignable to type 'string'. +!!! error TS2323: Type 'Date' is not assignable to type 'string'. var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexer ~~ -!!! Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'Date' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerTyping2.errors.txt b/tests/baselines/reference/numericIndexerTyping2.errors.txt index 5d7165dfeec..2736c9d6789 100644 --- a/tests/baselines/reference/numericIndexerTyping2.errors.txt +++ b/tests/baselines/reference/numericIndexerTyping2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/numericIndexerTyping2.ts(9,5): error TS2323: Type 'Date' is not assignable to type 'string'. +tests/cases/compiler/numericIndexerTyping2.ts(12,5): error TS2323: Type 'Date' is not assignable to type 'string'. + + ==== tests/cases/compiler/numericIndexerTyping2.ts (2 errors) ==== class I { [x: string]: Date @@ -9,9 +13,9 @@ var i: I; var r: string = i[1]; // error: numeric indexer returns the type of the string indexer ~ -!!! Type 'Date' is not assignable to type 'string'. +!!! error TS2323: Type 'Date' is not assignable to type 'string'. var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexere ~~ -!!! Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'Date' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt index 7ecf5f15824..d3192f8e3c5 100644 --- a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt +++ b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt @@ -1,34 +1,42 @@ +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(20,5): error TS1005: ',' expected. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(3,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(5,12): error TS2300: Duplicate identifier '2'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(10,5): error TS2300: Duplicate identifier '2.'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(15,5): error TS2300: Duplicate identifier '1'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(20,5): error TS2300: Duplicate identifier '2'. + + ==== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts (6 errors) ==== class C { 1: number; 1.0: number; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. static 2: number; static 2: number; ~ -!!! Duplicate identifier '2'. +!!! error TS2300: Duplicate identifier '2'. } interface I { 2: number; 2.: number; ~~ -!!! Duplicate identifier '2.'. +!!! error TS2300: Duplicate identifier '2.'. } var a: { 1: number; 1: number; ~ -!!! Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1'. } var b = { 2: 1 2: 1 ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Duplicate identifier '2'. +!!! error TS2300: Duplicate identifier '2'. } \ No newline at end of file diff --git a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt index ddde515f498..9ce36b4937c 100644 --- a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt +++ b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(6,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(12,5): error TS2300: Duplicate identifier '1'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(17,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(22,5): error TS2300: Duplicate identifier '0'. + + ==== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts (4 errors) ==== // Each of these types has an error in it. // String named and numeric named properties conflict if they would be equivalent after ToNumber on the property name. @@ -6,7 +12,7 @@ "1.0": number; // not a duplicate 1.0: number; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. } interface I { @@ -14,19 +20,19 @@ "1.": number; // not a duplicate 1: number; ~ -!!! Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1'. } var a: { "1": number; 1.0: string; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. } var b = { "0": '', 0: '' ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. } \ No newline at end of file diff --git a/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt b/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt index 6b3788ff53e..89693f4bced 100644 --- a/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt +++ b/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/objectCreationExpressionInFunctionParameter.ts(6,2): error TS1128: Declaration or statement expected. +tests/cases/compiler/objectCreationExpressionInFunctionParameter.ts(5,24): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/objectCreationExpressionInFunctionParameter.ts (2 errors) ==== class A { constructor(public a1: string) { @@ -5,7 +9,7 @@ } function foo(x = new A(123)) { //should error, 123 is not string ~~~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. }} ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt b/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt index d4bafcbc9cd..73332ff8926 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(53,17): error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(53,63): error TS2348: Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(54,33): error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. +tests/cases/compiler/objectCreationOfElementAccessExpression.ts(54,79): error TS2348: Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? + + ==== tests/cases/compiler/objectCreationOfElementAccessExpression.ts (4 errors) ==== class Food { private amount: number; @@ -53,12 +59,12 @@ // ElementAccessExpressions can only contain one expression. There should be a parse error here. var foods = new PetFood[new IceCream('Mint chocolate chip') , Cookie('Chocolate chip', false) , new Cookie('Peanut butter', true)]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An index expression argument must be of type 'string', 'number', or 'any'. +!!! error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Cookie('Chocolate chip', false) , new Cookie('Peanut butter', true)]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An index expression argument must be of type 'string', 'number', or 'any'. +!!! error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/objectLitArrayDeclNoNew.errors.txt b/tests/baselines/reference/objectLitArrayDeclNoNew.errors.txt index b7d5ae0f616..01c0fea7a26 100644 --- a/tests/baselines/reference/objectLitArrayDeclNoNew.errors.txt +++ b/tests/baselines/reference/objectLitArrayDeclNoNew.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/objectLitArrayDeclNoNew.ts(22,20): error TS1109: Expression expected. +tests/cases/compiler/objectLitArrayDeclNoNew.ts(27,1): error TS1128: Declaration or statement expected. + + ==== tests/cases/compiler/objectLitArrayDeclNoNew.ts (2 errors) ==== declare var console; "use strict"; @@ -22,11 +26,11 @@ return { tokens: Gar[],//IToken[], // Missing new. Correct syntax is: tokens: new IToken[] ~ -!!! Expression expected. +!!! error TS1109: Expression expected. endState: state }; } } } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectLitIndexerContextualType.errors.txt b/tests/baselines/reference/objectLitIndexerContextualType.errors.txt index b9d92a78385..ca65ee5a5be 100644 --- a/tests/baselines/reference/objectLitIndexerContextualType.errors.txt +++ b/tests/baselines/reference/objectLitIndexerContextualType.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/objectLitIndexerContextualType.ts(12,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/objectLitIndexerContextualType.ts(12,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/objectLitIndexerContextualType.ts(15,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/objectLitIndexerContextualType.ts(15,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/objectLitIndexerContextualType.ts(21,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/objectLitIndexerContextualType.ts(21,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + ==== tests/cases/compiler/objectLitIndexerContextualType.ts (6 errors) ==== interface I { [s: string]: (s: string) => number; @@ -12,16 +20,16 @@ x = { s: t => t * t, // Should error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. }; x = { 0: t => t * t, // Should error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. }; y = { s: t => t * t, // Should not error @@ -29,7 +37,7 @@ y = { 0: t => t * t, // Should error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. }; \ No newline at end of file diff --git a/tests/baselines/reference/objectLitPropertyScoping.errors.txt b/tests/baselines/reference/objectLitPropertyScoping.errors.txt index f317de68e75..420f8a5f192 100644 --- a/tests/baselines/reference/objectLitPropertyScoping.errors.txt +++ b/tests/baselines/reference/objectLitPropertyScoping.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/objectLitPropertyScoping.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/objectLitPropertyScoping.ts(8,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/objectLitPropertyScoping.ts (2 errors) ==== // Should compile, x and y should not be picked up from the properties @@ -5,12 +9,12 @@ return { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return x; }, get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return y; }, dist: function () { diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt index 2a3c8d43630..25f51e89882 100644 --- a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt +++ b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt @@ -1,6 +1,10 @@ +tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }': + Property 'a' is missing in type '{ b: number; }'. + + ==== tests/cases/compiler/objectLitStructuralTypeMismatch.ts (1 errors) ==== // Shouldn't compile var x: { a: number; } = { b: 5 }; ~ -!!! Type '{ b: number; }' is not assignable to type '{ a: number; }': -!!! Property 'a' is missing in type '{ b: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }': +!!! error TS2322: Property 'a' is missing in type '{ b: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt b/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt index 2d12916ab24..761cd24c1a0 100644 --- a/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt +++ b/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/objectLitTargetTypeCallSite.ts(5,9): error TS2345: Argument of type '{ a: boolean; b: string; }' is not assignable to parameter of type '{ a: number; b: string; }'. + Types of property 'a' are incompatible: + Type 'boolean' is not assignable to type 'number'. + + ==== tests/cases/compiler/objectLitTargetTypeCallSite.ts (1 errors) ==== function process( x: {a:number; b:string;}) { return x.a; @@ -5,6 +10,6 @@ process({a:true,b:"y"}); ~~~~~~~~~~~~~~ -!!! Argument of type '{ a: boolean; b: string; }' is not assignable to parameter of type '{ a: number; b: string; }'. -!!! Types of property 'a' are incompatible: -!!! Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2345: Argument of type '{ a: boolean; b: string; }' is not assignable to parameter of type '{ a: number; b: string; }'. +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralErrors.errors.txt b/tests/baselines/reference/objectLiteralErrors.errors.txt index 6a36b93edbb..367043a53ef 100644 --- a/tests/baselines/reference/objectLiteralErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralErrors.errors.txt @@ -1,169 +1,232 @@ +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(17,19): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(23,22): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(24,23): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(25,22): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(26,25): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(27,23): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(28,22): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(29,24): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(30,24): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(31,24): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(32,25): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(33,25): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(34,23): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(35,23): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(36,23): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,23): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,23): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,27): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,26): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,46): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(3,18): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(4,19): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(5,18): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(6,21): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(7,19): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(8,18): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(9,20): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(10,20): error TS2300: Duplicate identifier '"a"'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(11,20): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(12,21): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(13,21): error TS2300: Duplicate identifier ''1''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(14,19): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(15,19): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(16,19): error TS2300: Duplicate identifier '0x0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(17,19): error TS2300: Duplicate identifier '000'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(18,23): error TS2300: Duplicate identifier '1e2'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(19,22): error TS2300: Duplicate identifier '3.2e1'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(20,25): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(23,22): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(24,23): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(25,22): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(26,25): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(27,23): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(28,22): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(29,24): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(30,24): error TS2300: Duplicate identifier '"a"'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(31,24): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(32,25): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(33,25): error TS2300: Duplicate identifier ''1''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(34,23): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(35,23): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(36,23): error TS2300: Duplicate identifier '0x0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,23): error TS2300: Duplicate identifier '000'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,27): error TS2300: Duplicate identifier '1e2'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,26): error TS2300: Duplicate identifier '3.2e1'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,46): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,12): error TS2380: 'get' and 'set' accessor must have the same type. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,43): error TS2380: 'get' and 'set' accessor must have the same type. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,29): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,12): error TS2380: 'get' and 'set' accessor must have the same type. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51): error TS2380: 'get' and 'set' accessor must have the same type. + + ==== tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts (61 errors) ==== // Multiple properties with the same name var e1 = { a: 0, a: 0 }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e2 = { a: '', a: '' }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e3 = { a: 0, a: '' }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e4 = { a: true, a: false }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e5 = { a: {}, a: {} }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e6 = { a: 0, 'a': 0 }; ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var e7 = { 'a': 0, a: 0 }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e8 = { 'a': 0, "a": 0 }; ~~~ -!!! Duplicate identifier '"a"'. +!!! error TS2300: Duplicate identifier '"a"'. var e9 = { 'a': 0, 'a': 0 }; ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var e10 = { "a": 0, 'a': 0 }; ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var e11 = { 1.0: 0, '1': 0 }; ~~~ -!!! Duplicate identifier ''1''. +!!! error TS2300: Duplicate identifier ''1''. var e12 = { 0: 0, 0: 0 }; ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. var e13 = { 0: 0, 0: 0 }; ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. var e14 = { 0: 0, 0x0: 0 }; ~~~ -!!! Duplicate identifier '0x0'. +!!! error TS2300: Duplicate identifier '0x0'. var e14 = { 0: 0, 000: 0 }; ~~~ -!!! Octal literals are not available when targeting ECMAScript 5 and higher. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier '000'. +!!! error TS2300: Duplicate identifier '000'. var e15 = { "100": 0, 1e2: 0 }; ~~~ -!!! Duplicate identifier '1e2'. +!!! error TS2300: Duplicate identifier '1e2'. var e16 = { 0x20: 0, 3.2e1: 0 }; ~~~~~ -!!! Duplicate identifier '3.2e1'. +!!! error TS2300: Duplicate identifier '3.2e1'. var e17 = { a: 0, b: 1, a: 0 }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. // Accessor and property with the same name var f1 = { a: 0, get a() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f2 = { a: '', get a() { return ''; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f3 = { a: 0, get a() { return ''; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f4 = { a: true, get a() { return false; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f5 = { a: {}, get a() { return {}; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f6 = { a: 0, get 'a'() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var f7 = { 'a': 0, get a() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f8 = { 'a': 0, get "a"() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier '"a"'. +!!! error TS2300: Duplicate identifier '"a"'. var f9 = { 'a': 0, get 'a'() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var f10 = { "a": 0, get 'a'() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var f11 = { 1.0: 0, get '1'() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier ''1''. +!!! error TS2300: Duplicate identifier ''1''. var f12 = { 0: 0, get 0() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. var f13 = { 0: 0, get 0() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. var f14 = { 0: 0, get 0x0() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier '0x0'. +!!! error TS2300: Duplicate identifier '0x0'. var f14 = { 0: 0, get 000() { return 0; } }; ~~~ -!!! Octal literals are not available when targeting ECMAScript 5 and higher. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier '000'. +!!! error TS2300: Duplicate identifier '000'. var f15 = { "100": 0, get 1e2() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier '1e2'. +!!! error TS2300: Duplicate identifier '1e2'. var f16 = { 0x20: 0, get 3.2e1() { return 0; } }; ~~~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~~~ -!!! Duplicate identifier '3.2e1'. +!!! error TS2300: Duplicate identifier '3.2e1'. var f17 = { a: 0, get b() { return 1; }, get a() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. // Get and set accessor with mismatched type annotations var g1 = { get a(): number { return 4; }, set a(n: string) { } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. ~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. var g2 = { get a() { return 4; }, set a(n: string) { } }; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var g3 = { get a(): number { return undefined; }, set a(n: string) { } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. ~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralErrorsES3.errors.txt b/tests/baselines/reference/objectLiteralErrorsES3.errors.txt index b928d9546a4..2788c23a278 100644 --- a/tests/baselines/reference/objectLiteralErrorsES3.errors.txt +++ b/tests/baselines/reference/objectLiteralErrorsES3.errors.txt @@ -1,15 +1,21 @@ +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts(4,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts(4,40): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts (4 errors) ==== var e1 = { get a() { return 4; } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var e2 = { set a(n) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var e3 = { get a() { return ''; }, set a(n) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt index f4eef960bb9..f031031b0a8 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt @@ -1,3 +1,12 @@ +tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(8,4): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. + Property 'value' is missing in type '{ hello: number; }'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(11,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. + Property 'value' is missing in type '{ toString: (s: string) => string; }'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(12,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. + Property 'value' is missing in type '{ toString: (s: string) => string; }'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(13,36): error TS2339: Property 'uhhh' does not exist on type 'string'. + + ==== tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts (4 errors) ==== interface I { value: string; @@ -8,18 +17,18 @@ f2({ hello: 1 }) // error ~~~~~~~~~~~~ -!!! Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. -!!! Property 'value' is missing in type '{ hello: number; }'. +!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Property 'value' is missing in type '{ hello: number; }'. f2({ value: '' }) // missing toString satisfied by Object's member f2({ value: '', what: 1 }) // missing toString satisfied by Object's member f2({ toString: (s) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. -!!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. +!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ toString: (s: string) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. -!!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. +!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ value: '', toString: (s) => s.uhhh }) // error ~~~~ -!!! Property 'uhhh' does not exist on type 'string'. \ No newline at end of file +!!! error TS2339: Property 'uhhh' does not exist on type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt index 3b6995e0623..7cb3304aa2f 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt @@ -1,3 +1,17 @@ +tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(8,4): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. + Property 'value' is missing in type '{ hello: number; }'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(9,4): error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. + Property 'doStuff' is missing in type '{ value: string; }'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(10,4): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. + Property 'doStuff' is missing in type '{ value: string; what: number; }'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(11,4): error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. + Property 'value' is missing in type '{ toString: (s: any) => any; }'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(12,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'. + Property 'value' is missing in type '{ toString: (s: string) => string; }'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error TS2345: Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. + Property 'doStuff' is missing in type '{ value: string; toString: (s: any) => any; }'. + + ==== tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts (6 errors) ==== interface I2 { value: string; @@ -8,25 +22,25 @@ f2({ hello: 1 }) ~~~~~~~~~~~~ -!!! Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. -!!! Property 'value' is missing in type '{ hello: number; }'. +!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'value' is missing in type '{ hello: number; }'. f2({ value: '' }) ~~~~~~~~~~~~~ -!!! Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. -!!! Property 'doStuff' is missing in type '{ value: string; }'. +!!! error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; }'. f2({ value: '', what: 1 }) ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. -!!! Property 'doStuff' is missing in type '{ value: string; what: number; }'. +!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; what: number; }'. f2({ toString: (s) => s }) ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. -!!! Property 'value' is missing in type '{ toString: (s: any) => any; }'. +!!! error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'value' is missing in type '{ toString: (s: any) => any; }'. f2({ toString: (s: string) => s }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'. -!!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. +!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ value: '', toString: (s) => s.uhhh }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. -!!! Property 'doStuff' is missing in type '{ value: string; toString: (s: any) => any; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; toString: (s: any) => any; }'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt index 9019cd7246a..4e04b856d8c 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt @@ -1,35 +1,71 @@ +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(2,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(2,50): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(3,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(3,50): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(4,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(4,51): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(5,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(5,49): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(6,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(6,51): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(7,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(7,50): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(18,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(22,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(26,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(30,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(35,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(35,62): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(36,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(36,69): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(37,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(37,59): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(38,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(38,60): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(42,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(43,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(50,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(55,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(60,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(64,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(67,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(68,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(76,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(77,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts (34 errors) ==== // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; ~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; ~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} var callSig1 = { num(n: number) { return '' } }; @@ -42,58 +78,58 @@ // Get accessor only, type of the property is the annotated return type of the get accessor var getter1 = { get x(): string { return undefined; } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var getter1: { x: string; } // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var getter2: { x: string; } // Set accessor only, type of the property is the param type of the set accessor var setter1 = { set x(n: number) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var setter1: { x: number }; // Set accessor only, type of the property is Any for an unannotated set accessor var setter2 = { set x(n) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var setter2: { x: any }; var anyVar: any; // Get and set accessor with matching type annotations var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. // Type of unannotated get accessor return type is the type annotation of the set accessor param var setParamType1 = { set n(x: (t: string) => void) { }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. get n() { return (t) => { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var p: string; var p = t; } @@ -102,35 +138,35 @@ var setParamType2 = { get n() { return (t) => { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var p: string; var p = t; } }, set n(x: (t: string) => void) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; // Type of unannotated set accessor parameter is the return type annotation of the get accessor var getParamType1 = { set n(x) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y = x; var y: string; }, get n() { return ''; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; var getParamType2 = { get n() { return ''; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set n(x) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y = x; var y: string; } @@ -140,10 +176,10 @@ var getParamType3 = { get n() { return ''; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set n(x) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y = x; var y: string; } diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt index 019d5c2733a..18aa2c63160 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }': + Index signatures are incompatible: + Type 'A' is not assignable to type 'B': + Property 'y' is missing in type 'A'. + + ==== tests/cases/compiler/objectLiteralIndexerErrors.ts (1 errors) ==== interface A { x: number; @@ -13,8 +19,8 @@ var o1: { [s: string]: A;[n: number]: B; } = { x: b, 0: a }; // both indexers are A ~~ -!!! Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }': -!!! Index signatures are incompatible: -!!! Type 'A' is not assignable to type 'B': -!!! Property 'y' is missing in type 'A'. +!!! error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'B': +!!! error TS2322: Property 'y' is missing in type 'A'. o1 = { x: c, 0: a }; // string indexer is any, number indexer is A \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralParameterResolution.errors.txt b/tests/baselines/reference/objectLiteralParameterResolution.errors.txt index 4380a976380..415b4677cd8 100644 --- a/tests/baselines/reference/objectLiteralParameterResolution.errors.txt +++ b/tests/baselines/reference/objectLiteralParameterResolution.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/objectLiteralParameterResolution.ts(9,14): error TS2304: Cannot find name 'wrapSuccessCallback'. +tests/cases/compiler/objectLiteralParameterResolution.ts(9,34): error TS2304: Cannot find name 'requestContext'. +tests/cases/compiler/objectLiteralParameterResolution.ts(9,50): error TS2304: Cannot find name 'callback'. +tests/cases/compiler/objectLiteralParameterResolution.ts(10,12): error TS2304: Cannot find name 'wrapErrorCallback'. +tests/cases/compiler/objectLiteralParameterResolution.ts(10,30): error TS2304: Cannot find name 'requestContext'. +tests/cases/compiler/objectLiteralParameterResolution.ts(10,46): error TS2304: Cannot find name 'errorCallback'. + + ==== tests/cases/compiler/objectLiteralParameterResolution.ts (6 errors) ==== interface Foo{ extend(target: T, ...objs: any[]): T; @@ -9,18 +17,18 @@ data: "data" , success: wrapSuccessCallback(requestContext, callback) , ~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'wrapSuccessCallback'. +!!! error TS2304: Cannot find name 'wrapSuccessCallback'. ~~~~~~~~~~~~~~ -!!! Cannot find name 'requestContext'. +!!! error TS2304: Cannot find name 'requestContext'. ~~~~~~~~ -!!! Cannot find name 'callback'. +!!! error TS2304: Cannot find name 'callback'. error: wrapErrorCallback(requestContext, errorCallback) , ~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'wrapErrorCallback'. +!!! error TS2304: Cannot find name 'wrapErrorCallback'. ~~~~~~~~~~~~~~ -!!! Cannot find name 'requestContext'. +!!! error TS2304: Cannot find name 'requestContext'. ~~~~~~~~~~~~~ -!!! Cannot find name 'errorCallback'. +!!! error TS2304: Cannot find name 'errorCallback'. dataType: "json" , converters: { "text json": "" }, traditional: true , diff --git a/tests/baselines/reference/objectLiteralReferencingInternalProperties.errors.txt b/tests/baselines/reference/objectLiteralReferencingInternalProperties.errors.txt index c5bffb34662..d9785df1467 100644 --- a/tests/baselines/reference/objectLiteralReferencingInternalProperties.errors.txt +++ b/tests/baselines/reference/objectLiteralReferencingInternalProperties.errors.txt @@ -1,4 +1,7 @@ +tests/cases/compiler/objectLiteralReferencingInternalProperties.ts(1,21): error TS2304: Cannot find name 'b'. + + ==== tests/cases/compiler/objectLiteralReferencingInternalProperties.ts (1 errors) ==== var a = { b: 10, c: b }; // Should give error for attempting to reference b. ~ -!!! Cannot find name 'b'. \ No newline at end of file +!!! error TS2304: Cannot find name 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt index 7c3f272c683..1b1426e28b2 100644 --- a/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt +++ b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/objectLiteralWithGetAccessorInsideFunction.ts(3,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/objectLiteralWithGetAccessorInsideFunction.ts (1 errors) ==== function bar() { var x = { get _extraOccluded() { ~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var occluded = 0; return occluded; }, diff --git a/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt b/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt index cea10abde8d..00f724ee0a7 100644 --- a/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt +++ b/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt @@ -1,12 +1,17 @@ +tests/cases/compiler/objectLiteralWithNumericPropertyName.ts(4,5): error TS2322: Type '{ 0: number; }' is not assignable to type 'A': + Types of property '0' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/objectLiteralWithNumericPropertyName.ts (1 errors) ==== interface A { 0: string; } var x: A = { ~ -!!! Type '{ 0: number; }' is not assignable to type 'A': -!!! Types of property '0' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ 0: number; }' is not assignable to type 'A': +!!! error TS2322: Types of property '0' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. 0: 3 }; \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt index 65b100d9b8b..19c12ebf62f 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'data' of type 'A' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. + + ==== tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts (8 errors) ==== class A { foo: string; @@ -11,21 +21,21 @@ data: A; [x: string]: Object; ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'data' of type 'A' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'data' of type 'A' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'toString' of type '() => string' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. } class C { diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt index a592cca8f5f..42395ccf0b5 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt @@ -1,3 +1,17 @@ +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(7,1): error TS2322: Type 'I' is not assignable to type 'Object': + Types of property 'toString' are incompatible: + Type '() => void' is not assignable to type '() => string': + Type 'void' is not assignable to type 'string'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(14,1): error TS2322: Type 'C' is not assignable to type 'Object': + Types of property 'toString' are incompatible: + Type '() => void' is not assignable to type '() => string': + Type 'void' is not assignable to type 'string'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(20,1): error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object': + Types of property 'toString' are incompatible: + Type '() => void' is not assignable to type '() => string': + Type 'void' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts (3 errors) ==== interface I { toString(): void; @@ -7,10 +21,10 @@ var o: Object; o = i; // error ~ -!!! Type 'I' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => void' is not assignable to type '() => string': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'I' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => void' is not assignable to type '() => string': +!!! error TS2322: Type 'void' is not assignable to type 'string'. i = o; // ok class C { @@ -19,10 +33,10 @@ var c: C; o = c; // error ~ -!!! Type 'C' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => void' is not assignable to type '() => string': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => void' is not assignable to type '() => string': +!!! error TS2322: Type 'void' is not assignable to type 'string'. c = o; // ok var a = { @@ -30,8 +44,8 @@ } o = a; // error ~ -!!! Type '{ toString: () => void; }' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => void' is not assignable to type '() => string': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => void' is not assignable to type '() => string': +!!! error TS2322: Type 'void' is not assignable to type 'string'. a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt index 7bfc0894d3a..4a64f34aa5e 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt @@ -1,3 +1,25 @@ +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(7,1): error TS2322: Type 'I' is not assignable to type 'Object': + Types of property 'toString' are incompatible: + Type '() => number' is not assignable to type '() => string': + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I': + Types of property 'toString' are incompatible: + Type '() => string' is not assignable to type '() => number': + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(14,1): error TS2322: Type 'C' is not assignable to type 'Object': + Types of property 'toString' are incompatible: + Type '() => number' is not assignable to type '() => string': + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(15,1): error TS2322: Type 'Object' is not assignable to type 'C': + Types of property 'toString' are incompatible: + Type '() => string' is not assignable to type '() => number': + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(20,1): error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object': + Types of property 'toString' are incompatible: + Type '() => void' is not assignable to type '() => string': + Type 'void' is not assignable to type 'string'. + + ==== tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts (5 errors) ==== interface I { toString(): number; @@ -7,16 +29,16 @@ var o: Object; o = i; // error ~ -!!! Type 'I' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => number' is not assignable to type '() => string': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => number' is not assignable to type '() => string': +!!! error TS2322: Type 'number' is not assignable to type 'string'. i = o; // error ~ -!!! Type 'Object' is not assignable to type 'I': -!!! Types of property 'toString' are incompatible: -!!! Type '() => string' is not assignable to type '() => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'Object' is not assignable to type 'I': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => string' is not assignable to type '() => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. class C { toString(): number { return 1; } @@ -24,24 +46,24 @@ var c: C; o = c; // error ~ -!!! Type 'C' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => number' is not assignable to type '() => string': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => number' is not assignable to type '() => string': +!!! error TS2322: Type 'number' is not assignable to type 'string'. c = o; // error ~ -!!! Type 'Object' is not assignable to type 'C': -!!! Types of property 'toString' are incompatible: -!!! Type '() => string' is not assignable to type '() => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'Object' is not assignable to type 'C': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => string' is not assignable to type '() => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. var a = { toString: () => { } } o = a; // error ~ -!!! Type '{ toString: () => void; }' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => void' is not assignable to type '() => string': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => void' is not assignable to type '() => string': +!!! error TS2322: Type 'void' is not assignable to type 'string'. a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeLiteralSyntax2.errors.txt b/tests/baselines/reference/objectTypeLiteralSyntax2.errors.txt index 9608cf84421..a774115e350 100644 --- a/tests/baselines/reference/objectTypeLiteralSyntax2.errors.txt +++ b/tests/baselines/reference/objectTypeLiteralSyntax2.errors.txt @@ -1,8 +1,12 @@ +tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts(2,16): error TS1005: ';' expected. +tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts(12,22): error TS1005: ';' expected. + + ==== tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts (2 errors) ==== var x: { foo: string, ~ -!!! ';' expected. +!!! error TS1005: ';' expected. bar: string } @@ -14,4 +18,4 @@ var z: { foo: string bar: string } ~~~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index 8fbbcddff0b..982fcf05b3b 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2323: Type 'Object' is not assignable to type 'I'. +tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2323: Type 'Object' is not assignable to type '() => void'. + + ==== tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts (2 errors) ==== interface I { (): void; @@ -8,7 +12,7 @@ f = i; i = f; ~ -!!! Type 'Object' is not assignable to type 'I'. +!!! error TS2323: Type 'Object' is not assignable to type 'I'. var a: { (): void @@ -16,4 +20,4 @@ f = a; a = f; ~ -!!! Type 'Object' is not assignable to type '() => void'. \ No newline at end of file +!!! error TS2323: Type 'Object' is not assignable to type '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.errors.txt b/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.errors.txt index cb6bedb2179..1ae1e2d22a1 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.errors.txt +++ b/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/members/objectTypeWithConstructSignatureAppearsToBeFunctionType.ts(8,18): error TS2348: Value of type 'I' is not callable. Did you mean to include 'new'? +tests/cases/conformance/types/members/objectTypeWithConstructSignatureAppearsToBeFunctionType.ts(16,18): error TS2348: Value of type 'new () => number' is not callable. Did you mean to include 'new'? + + ==== tests/cases/conformance/types/members/objectTypeWithConstructSignatureAppearsToBeFunctionType.ts (2 errors) ==== // no errors expected below @@ -8,7 +12,7 @@ var i: I; var r2: number = i(); ~~~ -!!! Value of type 'I' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'I' is not callable. Did you mean to include 'new'? var r2b: number = new i(); var r2c: (x: any, y?: any) => any = i.apply; @@ -18,6 +22,6 @@ var r4: number = b(); ~~~ -!!! Value of type 'new () => number' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'new () => number' is not callable. Did you mean to include 'new'? var r4b: number = new b(); var r4c: (x: any, y?: any) => any = b.apply; \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index 9696c68769d..1544fb5bebe 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2323: Type 'Object' is not assignable to type 'I'. +tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2323: Type 'Object' is not assignable to type 'new () => any'. + + ==== tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts (2 errors) ==== interface I { new(): any; @@ -8,7 +12,7 @@ f = i; i = f; ~ -!!! Type 'Object' is not assignable to type 'I'. +!!! error TS2323: Type 'Object' is not assignable to type 'I'. var a: { new(): any @@ -16,4 +20,4 @@ f = a; a = f; ~ -!!! Type 'Object' is not assignable to type 'new () => any'. \ No newline at end of file +!!! error TS2323: Type 'Object' is not assignable to type 'new () => any'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt index 2049e3c9607..122304d1497 100644 --- a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt @@ -1,3 +1,17 @@ +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(6,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(7,5): error TS2300: Duplicate identifier '1.'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(8,5): error TS2300: Duplicate identifier '1.00'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(13,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(14,5): error TS2300: Duplicate identifier '1.'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(15,5): error TS2300: Duplicate identifier '1.00'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(20,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(21,5): error TS2300: Duplicate identifier '1.'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(22,5): error TS2300: Duplicate identifier '1.00'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(27,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(28,5): error TS2300: Duplicate identifier '1.'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(29,5): error TS2300: Duplicate identifier '1.00'. + + ==== tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts (12 errors) ==== // numeric properties must be distinct after a ToNumber operation // so the below are all errors @@ -6,52 +20,52 @@ 1; 1.0; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. 1.; ~~ -!!! Duplicate identifier '1.'. +!!! error TS2300: Duplicate identifier '1.'. 1.00; ~~~~ -!!! Duplicate identifier '1.00'. +!!! error TS2300: Duplicate identifier '1.00'. } interface I { 1; 1.0; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. 1.; ~~ -!!! Duplicate identifier '1.'. +!!! error TS2300: Duplicate identifier '1.'. 1.00; ~~~~ -!!! Duplicate identifier '1.00'. +!!! error TS2300: Duplicate identifier '1.00'. } var a: { 1; 1.0; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. 1.; ~~ -!!! Duplicate identifier '1.'. +!!! error TS2300: Duplicate identifier '1.'. 1.00; ~~~~ -!!! Duplicate identifier '1.00'. +!!! error TS2300: Duplicate identifier '1.00'. } var b = { 1: 1, 1.0: 1, ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. 1.: 1, ~~ -!!! Duplicate identifier '1.'. +!!! error TS2300: Duplicate identifier '1.'. 1.00: 1 ~~~~ -!!! Duplicate identifier '1.00'. +!!! error TS2300: Duplicate identifier '1.00'. } \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt index 21ec31d4085..6a6fe5965fc 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty.ts(13,1): error TS2322: Type 'List' is not assignable to type 'List': + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty.ts (1 errors) ==== // Basic recursive type @@ -13,5 +17,5 @@ list1 = list2; // ok list1 = list3; // error ~~~~~ -!!! Type 'List' is not assignable to type 'List': -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'List' is not assignable to type 'List': +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt index 7e209541a00..bcabfeaa183 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty2.ts(13,1): error TS2322: Type 'List' is not assignable to type 'List': + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty2.ts (1 errors) ==== // Basic recursive type @@ -13,5 +17,5 @@ list1 = list2; // ok list1 = list3; // error ~~~~~ -!!! Type 'List' is not assignable to type 'List': -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'List' is not assignable to type 'List': +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt index 123a8289f7f..9dc658d1850 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt @@ -1,3 +1,18 @@ +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(20,1): error TS2322: Type 'MyList' is not assignable to type 'List': + Types of property 'data' are incompatible: + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(22,1): error TS2322: Type 'MyList' is not assignable to type 'List': + Types of property 'data' are incompatible: + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(30,5): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(31,5): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(41,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(42,5): error TS2323: Type 'U' is not assignable to type 'T'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(43,5): error TS2323: Type 'T' is not assignable to type 'U'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(48,5): error TS2323: Type 'T' is not assignable to type 'List'. +tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(50,5): error TS2323: Type 'T' is not assignable to type 'MyList'. + + ==== tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts (9 errors) ==== // Types with infinitely expanding recursive types are type checked nominally @@ -20,15 +35,15 @@ list1 = myList1; // error, not nominally equal list1 = myList2; // error, type mismatch ~~~~~ -!!! Type 'MyList' is not assignable to type 'List': -!!! Types of property 'data' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'MyList' is not assignable to type 'List': +!!! error TS2322: Types of property 'data' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. list2 = myList1; // error, not nominally equal ~~~~~ -!!! Type 'MyList' is not assignable to type 'List': -!!! Types of property 'data' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'MyList' is not assignable to type 'List': +!!! error TS2322: Types of property 'data' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. list2 = myList2; // error, type mismatch var rList1 = new List>(); @@ -38,10 +53,10 @@ function foo, U extends MyList>(t: T, u: U) { t = u; // error ~ -!!! Type 'U' is not assignable to type 'T'. +!!! error TS2323: Type 'U' is not assignable to type 'T'. u = t; // error ~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. var a: List; var b: MyList; @@ -53,23 +68,23 @@ function foo2>(t: T, u: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! Type 'U' is not assignable to type 'T'. +!!! error TS2323: Type 'U' is not assignable to type 'T'. u = t; // was error, ok after constraint made illegal, doesn't matter ~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. var a: List; var b: MyList; a = t; // error ~ -!!! Type 'T' is not assignable to type 'List'. +!!! error TS2323: Type 'T' is not assignable to type 'List'. a = u; // error b = t; // ok ~ -!!! Type 'T' is not assignable to type 'MyList'. +!!! error TS2323: Type 'T' is not assignable to type 'MyList'. b = u; // ok } \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt index 8d05f4aa45a..d09701c3b06 100644 --- a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt +++ b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt @@ -1,3 +1,12 @@ +tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'Object'. +tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. + + ==== tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts (7 errors) ==== // object types can define string indexers that are more specific than the default 'any' that would be returned // no errors expected below @@ -5,19 +14,19 @@ interface Object { [x: string]: Object; ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'toString' of type '() => string' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. } var o = {}; var r = o['']; // should be Object diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.errors.txt index 994ce2a1cef..3e7cbacb759 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.errors.txt @@ -1,3 +1,7 @@ +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures3.ts(21,25): error TS2304: Cannot find name 'b'. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures3.ts(22,25): error TS2304: Cannot find name 'b'. + + ==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures3.ts (2 errors) ==== // object types are identical structurally @@ -21,10 +25,10 @@ function foo4(x: typeof b); ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. function foo4(x: typeof b); // error ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. function foo4(x: any) { } function foo13(x: I); diff --git a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.errors.txt b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.errors.txt index c3032d3eac1..dce23ed96e5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts(2,8): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts (1 errors) ==== interface A { (x: T, y: T): void ~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface B { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.errors.txt b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.errors.txt index 3dc6c5f5d34..b1221bb21aa 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(6,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(9,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(13,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(17,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(21,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(26,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(29,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(30,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts (8 errors) ==== // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, @@ -6,45 +16,45 @@ class A { foo(x: T, y: U): string { return null; } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } class B> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } class C { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } class D { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } interface I { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string; } interface I2 { foo(x: T, y: U): string; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var a: { foo>(x: T, y: U): string } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b = { foo(x: T, y: U) { return ''; } }; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. function foo1(x: A); function foo1(x: A); // error diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.errors.txt index 8ec2435ba29..42e7f11e939 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.errors.txt @@ -1,3 +1,13 @@ +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(15,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(18,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(22,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(26,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(30,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(35,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(38,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(39,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts (8 errors) ==== // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, @@ -15,45 +25,45 @@ class A { foo(x: T, y: U): string { return null; } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } class B { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } class C { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } class D> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } interface I> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string; } interface I2 { foo>(x: T, y: U): string; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var a: { foo(x: T, y: U): string } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b = { foo(x: T, y: U) { return ''; } }; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. function foo1(x: A); function foo1(x: A); // error diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.errors.txt b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.errors.txt index 7f1d923565a..536be73b5cc 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.errors.txt @@ -1,3 +1,12 @@ +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(5,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(9,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(13,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(17,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(22,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(25,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(26,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts (7 errors) ==== // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, @@ -5,40 +14,40 @@ class B> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } class C { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } class D { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } interface I { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. new(x: T, y: U): string; } interface I2 { new(x: T, y: U): string; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var a: { new>(x: T, y: U): string } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b = { new(x: T, y: U) { return ''; } }; // not a construct signature, function called new ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. function foo1b(x: B, Array>); function foo1b(x: B, Array>); // error diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.errors.txt index 053dec33b4a..33a62356d1c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.errors.txt @@ -1,3 +1,12 @@ +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(14,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(18,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(22,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(26,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(31,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(34,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(35,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. + + ==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts (7 errors) ==== // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, @@ -14,40 +23,40 @@ class B { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } class C { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } class D> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } interface I> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. new(x: T, y: U): string; } interface I2 { new>(x: T, y: U): string; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var a: { new(x: T, y: U): string } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b = { new(x: T, y: U) { return ''; } }; // not a construct signature, function called new ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. function foo1b(x: B); function foo1b(x: B); // error diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt new file mode 100644 index 00000000000..c950b935130 --- /dev/null +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt @@ -0,0 +1,33 @@ +tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts(25,1): error TS2353: Neither type 'C3' nor type 'C4' is assignable to the other: + Property 'y' is missing in type 'C3'. + + +==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts (1 errors) ==== + interface T1 { } + interface T2 { z } + + class C1 { + private x; + } + + class C2 extends C1 { + y; + } + + var c1: C1; + c1; // Should succeed (private x originates in the same declaration) + + + class C3 { + private x: T; // This T is the difference between C3 and C1 + } + + class C4 extends C3 { + y; + } + + var c3: C3; + c3; // Should fail (private x originates in the same declaration, but different types) + ~~~~~~ +!!! error TS2353: Neither type 'C3' nor type 'C4' is assignable to the other: +!!! error TS2353: Property 'y' is missing in type 'C3'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js new file mode 100644 index 00000000000..7c8dac97250 --- /dev/null +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -0,0 +1,62 @@ +//// [objectTypesIdentityWithPrivates3.ts] +interface T1 { } +interface T2 { z } + +class C1 { + private x; +} + +class C2 extends C1 { + y; +} + +var c1: C1; +c1; // Should succeed (private x originates in the same declaration) + + +class C3 { + private x: T; // This T is the difference between C3 and C1 +} + +class C4 extends C3 { + y; +} + +var c3: C3; +c3; // Should fail (private x originates in the same declaration, but different types) + +//// [objectTypesIdentityWithPrivates3.js] +var __extends = this.__extends || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + __.prototype = b.prototype; + d.prototype = new __(); +}; +var C1 = (function () { + function C1() { + } + return C1; +})(); +var C2 = (function (_super) { + __extends(C2, _super); + function C2() { + _super.apply(this, arguments); + } + return C2; +})(C1); +var c1; +c1; // Should succeed (private x originates in the same declaration) +var C3 = (function () { + function C3() { + } + return C3; +})(); +var C4 = (function (_super) { + __extends(C4, _super); + function C4() { + _super.apply(this, arguments); + } + return C4; +})(C3); +var c3; +c3; // Should fail (private x originates in the same declaration, but different types) diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt b/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt index 72759fbded2..0622b7badb0 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt +++ b/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(12,6): error TS1112: A class member cannot be declared optional. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(20,6): error TS1112: A class member cannot be declared optional. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,6): error TS1005: ':' expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,7): error TS1109: Expression expected. + + ==== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts (4 errors) ==== // Basic uses of optional properties @@ -12,7 +18,7 @@ class C { x?: number; // error ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. } interface I2 { @@ -22,13 +28,13 @@ class C2 { x?: T; // error ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. } var b = { x?: 1 // error ~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties2.errors.txt b/tests/baselines/reference/objectTypesWithOptionalProperties2.errors.txt index 75e3b2efc8e..a427681b22e 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties2.errors.txt +++ b/tests/baselines/reference/objectTypesWithOptionalProperties2.errors.txt @@ -1,57 +1,74 @@ +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(4,8): error TS1005: ';' expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(4,9): error TS1131: Property or signature expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(8,8): error TS1005: ';' expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(8,9): error TS1131: Property or signature expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(12,8): error TS1144: Block or ';' expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(12,9): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(16,8): error TS1005: ';' expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(16,9): error TS1131: Property or signature expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(20,8): error TS1144: Block or ';' expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(20,9): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(25,8): error TS1005: '{' expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(25,9): error TS1136: Property assignment expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(26,1): error TS1005: ':' expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(12,5): error TS2391: Function implementation is missing or not immediately following the declaration. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts(20,5): error TS2391: Function implementation is missing or not immediately following the declaration. + + ==== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts (15 errors) ==== // Illegal attempts to define optional methods var a: { x()?: number; // error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } interface I { x()?: number; // error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } class C { x()?: number; // error ~ -!!! Block or ';' expected. +!!! error TS1144: Block or ';' expected. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } interface I2 { x()?: T; // error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } class C2 { x()?: T; // error ~ -!!! Block or ';' expected. +!!! error TS1144: Block or ';' expected. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } var b = { x()?: 1 // error ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! Property assignment expected. +!!! error TS1136: Property assignment expected. } ~ -!!! ':' expected. \ No newline at end of file +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt index 630f4c2ee7c..d6f2d2bae19 100644 --- a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt +++ b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt @@ -1,22 +1,28 @@ +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(3,7): error TS2414: Class name cannot be 'any' +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(5,7): error TS2414: Class name cannot be 'number' +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(7,7): error TS2414: Class name cannot be 'boolean' +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(10,7): error TS2414: Class name cannot be 'string' + + ==== tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts (4 errors) ==== // it is an error to use a predefined type as a type name class any { } ~~~ -!!! Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any' class number { } ~~~~~~ -!!! Class name cannot be 'number' +!!! error TS2414: Class name cannot be 'number' class boolean { } ~~~~~~~ -!!! Class name cannot be 'boolean' +!!! error TS2414: Class name cannot be 'boolean' class bool { } // not a predefined type anymore class string { } ~~~~~~ -!!! Class name cannot be 'string' +!!! error TS2414: Class name cannot be 'string' \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName2.errors.txt b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName2.errors.txt index 0e36e0cdefa..32a693abdcb 100644 --- a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName2.errors.txt +++ b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName2.errors.txt @@ -1,6 +1,9 @@ +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName2.ts(3,7): error TS1003: Identifier expected. + + ==== tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName2.ts (1 errors) ==== // it is an error to use a predefined type as a type name class void {} // parse error unlike the others ~~~~ -!!! Identifier expected. \ No newline at end of file +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt b/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt index c282d871aff..a884dbc5005 100644 --- a/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt +++ b/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt @@ -1,5 +1,8 @@ +tests/cases/conformance/parser/ecmascript5/StrictMode/octalLiteralInStrictModeES3.ts(2,1): error TS1121: Octal literals are not allowed in strict mode. + + ==== tests/cases/conformance/parser/ecmascript5/StrictMode/octalLiteralInStrictModeES3.ts (1 errors) ==== "use strict"; 03; ~~ -!!! Octal literals are not allowed in strict mode. \ No newline at end of file +!!! error TS1121: Octal literals are not allowed in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/operatorAddNullUndefined.errors.txt b/tests/baselines/reference/operatorAddNullUndefined.errors.txt index 5accc58a1cc..269ee0a5166 100644 --- a/tests/baselines/reference/operatorAddNullUndefined.errors.txt +++ b/tests/baselines/reference/operatorAddNullUndefined.errors.txt @@ -1,17 +1,23 @@ +tests/cases/compiler/operatorAddNullUndefined.ts(2,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/compiler/operatorAddNullUndefined.ts(3,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/compiler/operatorAddNullUndefined.ts(4,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +tests/cases/compiler/operatorAddNullUndefined.ts(5,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. + + ==== tests/cases/compiler/operatorAddNullUndefined.ts (4 errors) ==== enum E { x } var x1 = null + null; ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var x2 = null + undefined; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var x3 = undefined + null; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var x4 = undefined + undefined; ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var x5 = 1 + null; var x6 = 1 + undefined; var x7 = null + 1; diff --git a/tests/baselines/reference/optionalArgsWithDefaultValues.errors.txt b/tests/baselines/reference/optionalArgsWithDefaultValues.errors.txt index def37b39fe4..414e718ac71 100644 --- a/tests/baselines/reference/optionalArgsWithDefaultValues.errors.txt +++ b/tests/baselines/reference/optionalArgsWithDefaultValues.errors.txt @@ -1,20 +1,27 @@ +tests/cases/compiler/optionalArgsWithDefaultValues.ts(1,25): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/optionalArgsWithDefaultValues.ts(4,27): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/optionalArgsWithDefaultValues.ts(5,28): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/optionalArgsWithDefaultValues.ts(8,10): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/optionalArgsWithDefaultValues.ts(9,13): error TS1015: Parameter cannot have question mark and initializer. + + ==== tests/cases/compiler/optionalArgsWithDefaultValues.ts (5 errors) ==== function foo(x: number, y?:boolean=false, z?=0) {} ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. class CCC { public foo(x: number, y?:boolean=false, z?=0) {} ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. static foo2(x: number, y?:boolean=false, z?=0) {} ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. } var a = (x?=0) => { return 1; }; ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. var b = (x, y?:number = 2) => { x; }; ~ -!!! Parameter cannot have question mark and initializer. \ No newline at end of file +!!! error TS1015: Parameter cannot have question mark and initializer. \ No newline at end of file diff --git a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt index 93ddbfa149b..a930e9f7657 100644 --- a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt +++ b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2322: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise': + Types of parameters 'onFulFill' and 'onFulfill' are incompatible: + Type '(value: number) => any' is not assignable to type '(value: string) => any': + Types of parameters 'value' and 'value' are incompatible: + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/optionalFunctionArgAssignability.ts (1 errors) ==== interface Promise { then(onFulfill?: (value: T) => U, onReject?: (reason: any) => U): Promise; @@ -7,9 +14,9 @@ var b = function then(onFulFill?: (value: number) => U, onReject?: (reason: any) => U): Promise { return null }; a = b; // error because number is not assignable to string ~ -!!! Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise': -!!! Types of parameters 'onFulFill' and 'onFulfill' are incompatible: -!!! Type '(value: number) => any' is not assignable to type '(value: string) => any': -!!! Types of parameters 'value' and 'value' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise': +!!! error TS2322: Types of parameters 'onFulFill' and 'onFulfill' are incompatible: +!!! error TS2322: Type '(value: number) => any' is not assignable to type '(value: string) => any': +!!! error TS2322: Types of parameters 'value' and 'value' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamArgsTest.errors.txt b/tests/baselines/reference/optionalParamArgsTest.errors.txt index b3be75d6daa..ed46bfd3344 100644 --- a/tests/baselines/reference/optionalParamArgsTest.errors.txt +++ b/tests/baselines/reference/optionalParamArgsTest.errors.txt @@ -1,3 +1,27 @@ +tests/cases/compiler/optionalParamArgsTest.ts(35,47): error TS1016: A required parameter cannot follow an optional parameter. +tests/cases/compiler/optionalParamArgsTest.ts(35,5): error TS2393: Duplicate function implementation. +tests/cases/compiler/optionalParamArgsTest.ts(99,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(100,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(101,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(102,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(103,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(104,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(105,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(106,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(107,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(108,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(109,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(110,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(111,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(112,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(113,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(114,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(115,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(116,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(117,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/optionalParamArgsTest.ts(118,1): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/optionalParamArgsTest.ts (22 errors) ==== // Optional parameter and default argument tests @@ -35,9 +59,9 @@ // "Optional parameters may only be followed by other optional parameters" public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3:number) { return C1M5A1 + C1M5A2; } ~~~~~~ -!!! A required parameter cannot follow an optional parameter. +!!! error TS1016: A required parameter cannot follow an optional parameter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. } class C2 extends C1 { @@ -103,64 +127,64 @@ // Negative tests - we expect these cases to fail c1o1.C1M1(1); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M1(1); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F1(1); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L1(1); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. c1o1.C1M2(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M2(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F2(); ~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L2(); ~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. c1o1.C1M2(1,2); ~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M2(1,2); ~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F2(1,2); ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L2(1,2); ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. c1o1.C1M3(1,2,3); ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M3(1,2,3); ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F3(1,2,3); ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L3(1,2,3); ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. c1o1.C1M4(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M4(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F4(); ~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L4(); ~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. function fnOpt1(id: number, children: number[] = [], expectedPath: number[] = [], isRoot?: boolean): void {} function fnOpt2(id: number, children?: number[], expectedPath?: number[], isRoot?: boolean): void {} diff --git a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt index c79360011d2..f6e9cd01761 100644 --- a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt +++ b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/optionalParamAssignmentCompat.ts(10,5): error TS2322: Type '(p1?: string) => I1' is not assignable to type 'I1': + Types of parameters 'p1' and 'p1' are incompatible: + Type 'string' is not assignable to type 'number'. + + ==== tests/cases/compiler/optionalParamAssignmentCompat.ts (1 errors) ==== interface I1 { (p1: number, p2: string): void; @@ -10,7 +15,7 @@ var c: I1 = i2.p1; // should be ok var d: I1 = i2.m1; // should error ~ -!!! Type '(p1?: string) => I1' is not assignable to type 'I1': -!!! Types of parameters 'p1' and 'p1' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(p1?: string) => I1' is not assignable to type 'I1': +!!! error TS2322: Types of parameters 'p1' and 'p1' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt b/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt index 51c632bded9..fa89c3ed761 100644 --- a/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt +++ b/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/optionalParamReferencingOtherParams2.ts(2,29): error TS2373: Initializer of parameter 'y' cannot reference identifier 'b' declared after it. + + ==== tests/cases/compiler/optionalParamReferencingOtherParams2.ts (1 errors) ==== var a = 1; function strange(x = a, y = b) { ~ -!!! Initializer of parameter 'y' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'b' declared after it. var b = ""; return y; } \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamReferencingOtherParams3.errors.txt b/tests/baselines/reference/optionalParamReferencingOtherParams3.errors.txt index ab344ba4f8d..f2b8d3d9127 100644 --- a/tests/baselines/reference/optionalParamReferencingOtherParams3.errors.txt +++ b/tests/baselines/reference/optionalParamReferencingOtherParams3.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/optionalParamReferencingOtherParams3.ts(1,20): error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. + + ==== tests/cases/compiler/optionalParamReferencingOtherParams3.ts (1 errors) ==== function right(a = b, b = a) { ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. a; b; } \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamTypeComparison.errors.txt b/tests/baselines/reference/optionalParamTypeComparison.errors.txt index f80329a5b1b..29ecc73509f 100644 --- a/tests/baselines/reference/optionalParamTypeComparison.errors.txt +++ b/tests/baselines/reference/optionalParamTypeComparison.errors.txt @@ -1,14 +1,22 @@ +tests/cases/compiler/optionalParamTypeComparison.ts(4,1): error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void': + Types of parameters 'b' and 'n' are incompatible: + Type 'boolean' is not assignable to type 'number'. +tests/cases/compiler/optionalParamTypeComparison.ts(5,1): error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void': + Types of parameters 'n' and 'b' are incompatible: + Type 'number' is not assignable to type 'boolean'. + + ==== tests/cases/compiler/optionalParamTypeComparison.ts (2 errors) ==== var f: (s: string, n?: number) => void; var g: (s: string, b?: boolean) => void; f = g; ~ -!!! Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void': -!!! Types of parameters 'b' and 'n' are incompatible: -!!! Type 'boolean' is not assignable to type 'number'. +!!! error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void': +!!! error TS2322: Types of parameters 'b' and 'n' are incompatible: +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. g = f; ~ -!!! Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void': -!!! Types of parameters 'n' and 'b' are incompatible: -!!! Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void': +!!! error TS2322: Types of parameters 'n' and 'b' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalPropertiesInClasses.errors.txt b/tests/baselines/reference/optionalPropertiesInClasses.errors.txt index d63270ea0fa..d1193270c0c 100644 --- a/tests/baselines/reference/optionalPropertiesInClasses.errors.txt +++ b/tests/baselines/reference/optionalPropertiesInClasses.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/optionalPropertiesInClasses.ts(10,7): error TS2421: Class 'C2' incorrectly implements interface 'ifoo': + Property 'y' is missing in type 'C2'. + + ==== tests/cases/compiler/optionalPropertiesInClasses.ts (1 errors) ==== interface ifoo { x?:number; @@ -10,8 +14,8 @@ class C2 implements ifoo { // ERROR - still need 'y' ~~ -!!! Class 'C2' incorrectly implements interface 'ifoo': -!!! Property 'y' is missing in type 'C2'. +!!! error TS2421: Class 'C2' incorrectly implements interface 'ifoo': +!!! error TS2421: Property 'y' is missing in type 'C2'. public x:number; } diff --git a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt index 348eed0916b..1d081bb64a9 100644 --- a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt +++ b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt @@ -1,10 +1,26 @@ +tests/cases/compiler/optionalPropertiesSyntax.ts(11,7): error TS1005: ';' expected. +tests/cases/compiler/optionalPropertiesSyntax.ts(11,8): error TS1131: Property or signature expected. +tests/cases/compiler/optionalPropertiesSyntax.ts(12,5): error TS1131: Property or signature expected. +tests/cases/compiler/optionalPropertiesSyntax.ts(18,11): error TS1005: ';' expected. +tests/cases/compiler/optionalPropertiesSyntax.ts(18,12): error TS1131: Property or signature expected. +tests/cases/compiler/optionalPropertiesSyntax.ts(32,18): error TS1005: ';' expected. +tests/cases/compiler/optionalPropertiesSyntax.ts(32,19): error TS1131: Property or signature expected. +tests/cases/compiler/optionalPropertiesSyntax.ts(33,5): error TS1131: Property or signature expected. +tests/cases/compiler/optionalPropertiesSyntax.ts(34,6): error TS1019: An index signature parameter cannot have a question mark. +tests/cases/compiler/optionalPropertiesSyntax.ts(4,5): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/optionalPropertiesSyntax.ts(25,5): error TS2300: Duplicate identifier 'prop'. +tests/cases/compiler/optionalPropertiesSyntax.ts(32,5): error TS2375: Duplicate number index signature. +tests/cases/compiler/optionalPropertiesSyntax.ts(33,7): error TS2375: Duplicate number index signature. +tests/cases/compiler/optionalPropertiesSyntax.ts(34,5): error TS2375: Duplicate number index signature. + + ==== tests/cases/compiler/optionalPropertiesSyntax.ts (14 errors) ==== interface fnSigs { //functions signatures can be optional fn(): void; fn?(): void; //err ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. fn2?(): void; } @@ -13,12 +29,12 @@ (): any; ()?: any; //err ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ?(): any; //err ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } interface constructSig { @@ -26,9 +42,9 @@ new (): any; new ()?: any; //err ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. new ?(): any; //err } @@ -37,7 +53,7 @@ prop: any; prop?: any; ~~~~ -!!! Duplicate identifier 'prop'. +!!! error TS2300: Duplicate identifier 'prop'. prop2?: any; } @@ -46,19 +62,19 @@ [idx: number]: any; [idx: number]?: any; //err ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. ? [idx: number]: any; //err ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. [idx?: number]: any; //err ~~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/optionalPropertiesTest.errors.txt b/tests/baselines/reference/optionalPropertiesTest.errors.txt index 8068dd5e061..3f32baa3407 100644 --- a/tests/baselines/reference/optionalPropertiesTest.errors.txt +++ b/tests/baselines/reference/optionalPropertiesTest.errors.txt @@ -1,3 +1,13 @@ +tests/cases/compiler/optionalPropertiesTest.ts(14,1): error TS2322: Type '{ name: string; }' is not assignable to type 'IFoo': + Property 'id' is missing in type '{ name: string; }'. +tests/cases/compiler/optionalPropertiesTest.ts(25,5): error TS2322: Type '{}' is not assignable to type 'i1': + Property 'M' is missing in type '{}'. +tests/cases/compiler/optionalPropertiesTest.ts(26,5): error TS2322: Type '{}' is not assignable to type 'i3': + Property 'M' is missing in type '{}'. +tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2322: Type 'i2' is not assignable to type 'i1': + Required property 'M' cannot be reimplemented with optional property in 'i2'. + + ==== tests/cases/compiler/optionalPropertiesTest.ts (4 errors) ==== var x: {p1:number; p2?:string; p3?:{():number;};}; @@ -14,8 +24,8 @@ foo = { id: 1234, name: "test" }; // Ok foo = { name: "test" }; // Error, id missing ~~~ -!!! Type '{ name: string; }' is not assignable to type 'IFoo': -!!! Property 'id' is missing in type '{ name: string; }'. +!!! error TS2322: Type '{ name: string; }' is not assignable to type 'IFoo': +!!! error TS2322: Property 'id' is missing in type '{ name: string; }'. foo = {id: 1234, print:()=>{}} // Ok var s = foo.name || "default"; @@ -28,12 +38,12 @@ var test1: i1 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i1': -!!! Property 'M' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i1': +!!! error TS2322: Property 'M' is missing in type '{}'. var test2: i3 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i3': -!!! Property 'M' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i3': +!!! error TS2322: Property 'M' is missing in type '{}'. var test3: i2 = {}; var test4: i4 = {}; var test5: i1 = { M: function () { } }; @@ -49,5 +59,5 @@ var test10_2: i2; test10_1 = test10_2; ~~~~~~~~ -!!! Type 'i2' is not assignable to type 'i1': -!!! Required property 'M' cannot be reimplemented with optional property in 'i2'. \ No newline at end of file +!!! error TS2322: Type 'i2' is not assignable to type 'i1': +!!! error TS2322: Required property 'M' cannot be reimplemented with optional property in 'i2'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalSetterParam.errors.txt b/tests/baselines/reference/optionalSetterParam.errors.txt index 6f3b39e7138..732351671ce 100644 --- a/tests/baselines/reference/optionalSetterParam.errors.txt +++ b/tests/baselines/reference/optionalSetterParam.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/optionalSetterParam.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + + ==== tests/cases/compiler/optionalSetterParam.ts (1 errors) ==== class foo { public set bar(param?:any) { } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt index 9ff39d72f45..b7b9f437735 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(22,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. + + ==== tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts (1 errors) ==== interface A { (x: { s: string }): string @@ -22,6 +25,6 @@ var w: A; var w: C; ~ -!!! Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. w({ s: "", n: 0 }).toLowerCase(); \ No newline at end of file diff --git a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt index 82ddd8bcef0..cb2635c4a3b 100644 --- a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt +++ b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/overEagerReturnTypeSpecialization.ts(8,5): error TS2322: Type 'I1' is not assignable to type 'I1': + Type 'number' is not assignable to type 'string'. + + ==== tests/cases/compiler/overEagerReturnTypeSpecialization.ts (1 errors) ==== //Note: Below simpler repro @@ -8,8 +12,8 @@ declare var v1: I1; var r1: I1 = v1.func(num => num.toString()) // Correctly returns an I1 ~~ -!!! Type 'I1' is not assignable to type 'I1': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I1' is not assignable to type 'I1': +!!! error TS2322: Type 'number' is not assignable to type 'string'. .func(str => str.length); // should error var r2: I1 = v1.func(num => num.toString()) // Correctly returns an I1 diff --git a/tests/baselines/reference/overload1.errors.txt b/tests/baselines/reference/overload1.errors.txt index 415a44ebae5..c4d3d999880 100644 --- a/tests/baselines/reference/overload1.errors.txt +++ b/tests/baselines/reference/overload1.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/overload1.ts(27,5): error TS2323: Type 'C' is not assignable to type 'string'. +tests/cases/compiler/overload1.ts(29,1): error TS2323: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/overload1.ts(31,3): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/overload1.ts(32,3): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/overload1.ts(33,1): error TS2323: Type 'C' is not assignable to type 'string'. +tests/cases/compiler/overload1.ts(34,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. + + ==== tests/cases/compiler/overload1.ts (6 errors) ==== module O { export class A { @@ -27,24 +35,24 @@ var e:string=x.g(new O.A()); // matches overload but bad assignment ~ -!!! Type 'C' is not assignable to type 'string'. +!!! error TS2323: Type 'C' is not assignable to type 'string'. var y:string=x.f(3); // good y=x.f("nope"); // can't assign number to string ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var z:string=x.g(x.g(3,3)); // good z=x.g(2,2,2); // no match ~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. z=x.g(); // no match ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. z=x.g(new O.B()); // ambiguous (up and down conversion) ~ -!!! Type 'C' is not assignable to type 'string'. +!!! error TS2323: Type 'C' is not assignable to type 'string'. z=x.h(2,2); // no match ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. z=x.h("hello",0); // good var v=x.g; diff --git a/tests/baselines/reference/overloadAssignmentCompat.errors.txt b/tests/baselines/reference/overloadAssignmentCompat.errors.txt index f5cf4b6a6f6..aa25558203b 100644 --- a/tests/baselines/reference/overloadAssignmentCompat.errors.txt +++ b/tests/baselines/reference/overloadAssignmentCompat.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/overloadAssignmentCompat.ts(35,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/overloadAssignmentCompat.ts (1 errors) ==== // ok - overload signatures are assignment compatible with their implementation @@ -35,7 +38,7 @@ // error - signatures are not assignment compatible function foo():number; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "a" }; \ No newline at end of file diff --git a/tests/baselines/reference/overloadModifiersMustAgree.errors.txt b/tests/baselines/reference/overloadModifiersMustAgree.errors.txt index f2aa56b8e4d..0bfd9b4d2bd 100644 --- a/tests/baselines/reference/overloadModifiersMustAgree.errors.txt +++ b/tests/baselines/reference/overloadModifiersMustAgree.errors.txt @@ -1,24 +1,30 @@ +tests/cases/compiler/overloadModifiersMustAgree.ts(2,12): error TS2385: Overload signatures must all be public or private. +tests/cases/compiler/overloadModifiersMustAgree.ts(6,18): error TS2384: Overload signatures must all be ambient or non-ambient. +tests/cases/compiler/overloadModifiersMustAgree.ts(7,17): error TS2383: Overload signatures must all be exported or not exported. +tests/cases/compiler/overloadModifiersMustAgree.ts(12,5): error TS2386: Overload signatures must all be optional or required. + + ==== tests/cases/compiler/overloadModifiersMustAgree.ts (4 errors) ==== class baz { public foo(); ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private foo(bar?: any) { } // error - access modifiers do not agree } declare function bar(); ~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. export function bar(s: string); ~~~ -!!! Overload signatures must all be exported or not exported. +!!! error TS2383: Overload signatures must all be exported or not exported. function bar(s?: string) { } interface I { foo? (); foo(s: string); ~~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt index 42336209049..0d4cd775c56 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt @@ -1,8 +1,13 @@ +tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(1,37): error TS1005: ';' expected. +tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(1,42): error TS1108: A 'return' statement can only be used within a function body. +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 (3 errors) ==== var f: (x: 'hi') => number = ('hi') => { return 1; }; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! A 'return' statement can only be used within a function body. +!!! error TS1108: A 'return' statement can only be used within a function body. ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt b/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt index b64650db422..9ac9e2253f0 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/overloadOnConstConstraintChecks4.ts(9,1): error TS2394: Overload signature is not compatible with function implementation. + + ==== tests/cases/compiler/overloadOnConstConstraintChecks4.ts (1 errors) ==== class Z { } class A extends Z { private x = 1 } @@ -9,7 +12,7 @@ function foo(name: 'bye'): C; function foo(name: string): A; // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(name: any): Z { return null; } diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt index 04df57d7fcc..4714c06ee73 100644 --- a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts(1,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts(2,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts (2 errors) ==== function foo(a: 'hi', x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: any, x: any) { } diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt index 4124c643554..e040559a054 100644 --- a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt +++ b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt @@ -1,13 +1,17 @@ +tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts(6,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts (2 errors) ==== interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C implements I { x1(a: number, callback: (x: 'hi') => number) { // error ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInCallback1.errors.txt b/tests/baselines/reference/overloadOnConstInCallback1.errors.txt index 40473b6b6aa..5d594204933 100644 --- a/tests/baselines/reference/overloadOnConstInCallback1.errors.txt +++ b/tests/baselines/reference/overloadOnConstInCallback1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/overloadOnConstInCallback1.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadOnConstInCallback1.ts (1 errors) ==== class C { x1(a: number, callback: (x: 'hi') => number); // error ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: any) => number) { callback('hi'); callback('bye'); diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt index 11d35bdedf5..5788a9e6bbe 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts(5,35): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts (2 errors) ==== interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt index ff965b47a18..f50dcd04a1d 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': + Types of property 'addEventListener' are incompatible: + Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. +tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadOnConstInheritance2.ts (2 errors) ==== interface Base { addEventListener(x: string): any; @@ -5,11 +11,11 @@ } interface Deriver extends Base { ~~~~~~~ -!!! Interface 'Deriver' incorrectly extends interface 'Base': -!!! Types of property 'addEventListener' are incompatible: -!!! Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. +!!! error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': +!!! error TS2429: Types of property 'addEventListener' are incompatible: +!!! error TS2429: Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt index cbfd32b1d6d..4ddb7d3669a 100644 --- a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt @@ -1,18 +1,25 @@ +tests/cases/compiler/overloadOnConstInheritance3.ts(4,11): error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': + Types of property 'addEventListener' are incompatible: + Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. +tests/cases/compiler/overloadOnConstInheritance3.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadOnConstInheritance3.ts (3 errors) ==== interface Base { addEventListener(x: string): any; } interface Deriver extends Base { ~~~~~~~ -!!! Interface 'Deriver' incorrectly extends interface 'Base': -!!! Types of property 'addEventListener' are incompatible: -!!! Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. +!!! error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': +!!! error TS2429: Types of property 'addEventListener' are incompatible: +!!! error TS2429: Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. // shouldn't need to redeclare the string overload addEventListener(x: 'bar'): string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. addEventListener(x: 'foo'): string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance4.errors.txt b/tests/baselines/reference/overloadOnConstInheritance4.errors.txt index f2debeac4ff..54200023408 100644 --- a/tests/baselines/reference/overloadOnConstInheritance4.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance4.errors.txt @@ -1,16 +1,21 @@ +tests/cases/compiler/overloadOnConstInheritance4.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstInheritance4.ts(5,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstInheritance4.ts(6,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadOnConstInheritance4.ts (3 errors) ==== interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C implements I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: 'hi') => number) { ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt index ad3dc56a7f9..2827a97ca82 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt @@ -1,10 +1,16 @@ +tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(1,28): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(2,28): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(9,8): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(14,7): error TS2381: A signature with an implementation cannot use a string literal type. + + ==== tests/cases/compiler/overloadOnConstNoAnyImplementation.ts (4 errors) ==== function x1(a: number, cb: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x1(a: number, cb: (x: 'bye') => number); ~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x1(a: number, cb: (x: string) => number) { cb('hi'); cb('bye'); @@ -13,12 +19,12 @@ cb('uh'); cb(1); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. } var cb: (number) => number = (x: number) => 1; x1(1, cb); x1(1, (x: 'hi') => 1); // error ~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. x1(1, (x: string) => 1); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt index 201165a56ec..aab390c48e8 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt @@ -1,14 +1,21 @@ +tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(6,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(12,18): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(17,9): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(18,9): error TS2381: A signature with an implementation cannot use a string literal type. + + ==== tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts (5 errors) ==== interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: string) => number) { callback('hi'); callback('bye'); @@ -16,17 +23,17 @@ callback(hm); callback(1); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. } } var c: C; c.x1(1, (x: 'hi') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x: 'bye') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt index 73c954ef10c..f897cae121d 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/overloadOnConstNoNonSpecializedSignature.ts(2,4): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadOnConstNoNonSpecializedSignature.ts (1 errors) ==== class C { x1(a: 'hi'); // error, no non-specialized signature in overload list ~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: string) { } } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt index 8ac0806a496..12dcdaf9769 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt @@ -1,10 +1,15 @@ +tests/cases/compiler/overloadOnConstNoStringImplementation.ts(1,28): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstNoStringImplementation.ts(2,28): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstNoStringImplementation.ts(14,7): error TS2381: A signature with an implementation cannot use a string literal type. + + ==== tests/cases/compiler/overloadOnConstNoStringImplementation.ts (3 errors) ==== function x2(a: number, cb: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x2(a: number, cb: (x: 'bye') => number); ~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x2(a: number, cb: (x: any) => number) { cb('hi'); cb('bye'); @@ -18,5 +23,5 @@ x2(1, cb); // error x2(1, (x: 'hi') => 1); // error ~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. x2(1, (x: string) => 1); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt index f7fdeed169b..c85b004f160 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt @@ -1,14 +1,20 @@ +tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(6,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(17,9): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(18,9): error TS2381: A signature with an implementation cannot use a string literal type. + + ==== tests/cases/compiler/overloadOnConstNoStringImplementation2.ts (4 errors) ==== interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C implements I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: any) => number) { callback('hi'); callback('bye'); @@ -21,9 +27,9 @@ var c: C; c.x1(1, (x: 'hi') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x: 'bye') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x: string) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt index 1369843e9b4..bfdb66aa437 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(6,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(7,1): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: Argument of type 'string' is not assignable to parameter of type '"SPAN"'. + + ==== tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts (3 errors) ==== class Base { foo() { } } class Derived1 extends Base { bar() { } } @@ -6,15 +11,15 @@ function foo(name: "SPAN"): Derived1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(name: "DIV"): Derived2 { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return null; ~~~~~~~~~~~~~~~~ } ~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. foo("HI"); ~~~~ -!!! Argument of type 'string' is not assignable to parameter of type '"SPAN"'. \ No newline at end of file +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"SPAN"'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolution.errors.txt b/tests/baselines/reference/overloadResolution.errors.txt index a5d0a02969d..729b52d6045 100644 --- a/tests/baselines/reference/overloadResolution.errors.txt +++ b/tests/baselines/reference/overloadResolution.errors.txt @@ -1,3 +1,22 @@ +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(27,5): error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(41,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(63,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(70,5): error TS2344: Type 'string' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(70,13): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(70,21): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(71,5): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(71,13): error TS2344: Type 'string' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(71,21): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(72,5): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(72,13): error TS2344: Type 'string' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(81,5): error TS2344: Type 'boolean' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(81,14): error TS2344: Type 'Date' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(84,5): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(85,11): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(91,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(91,22): error TS2339: Property 'toFixed' does not exist on type 'string'. + + ==== tests/cases/conformance/expressions/functionCalls/overloadResolution.ts (17 errors) ==== class SomeBase { private n; @@ -27,7 +46,7 @@ // No candidate overloads found fn1({}); // Error ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments function fn2(s: string, n: number): number; @@ -43,7 +62,7 @@ // Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments fn2('', 0); // Error ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. // Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments fn2('', 0); // OK @@ -67,7 +86,7 @@ // Generic overloads with differing arity called with type argument count that doesn't match any overload fn3(); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. // Generic overloads with constraints called with type arguments that satisfy the constraints function fn4(n: T, m: U); @@ -76,23 +95,23 @@ fn4('', 3); fn4(3, ''); // Error ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. fn4('', 3); // Error ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. fn4(3, ''); ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that satisfy the constraints fn4('', 3); @@ -103,17 +122,17 @@ // Generic overloads with constraints called with type arguments that do not satisfy the constraints fn4(null, null); // Error ~~~~~~~ -!!! Type 'boolean' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'boolean' does not satisfy the constraint 'string'. ~~~~ -!!! Type 'Date' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'Date' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4(true, null); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. fn4(null, true); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors function fn5(f: (n: string) => void): string; @@ -121,9 +140,9 @@ function fn5() { return undefined; } var n = fn5((n) => n.toFixed()); ~ -!!! Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. ~~~~~~~ -!!! Property 'toFixed' does not exist on type 'string'. +!!! error TS2339: Property 'toFixed' does not exist on type 'string'. var s = fn5((n) => n.substr(0)); \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt index 389ae265c32..676d5ea12d0 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt @@ -1,3 +1,23 @@ +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(27,9): error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(60,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(61,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(65,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(73,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(74,9): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(74,17): error TS2344: Type 'string' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(74,25): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(75,9): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(75,17): error TS2344: Type 'string' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(79,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(80,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(84,9): error TS2344: Type 'boolean' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(84,18): error TS2344: Type 'Date' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(87,9): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(88,15): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(96,18): error TS2339: Property 'toFixed' does not exist on type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(98,18): error TS2339: Property 'blah' does not exist on type 'string'. + + ==== tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts (18 errors) ==== class SomeBase { private n; @@ -27,7 +47,7 @@ // No candidate overloads found new fn1({}); // Error ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments class fn2 { @@ -62,16 +82,16 @@ // Generic overloads with differing arity called with type arguments matching each overload type parameter count new fn3(4); // Error ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. new fn3('', '', ''); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. new fn3('', '', 3); // Generic overloads with differing arity called with type argument count that doesn't match any overload new fn3(); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. // Generic overloads with constraints called with type arguments that satisfy the constraints class fn4 { @@ -81,44 +101,44 @@ new fn4('', 3); new fn4(3, ''); // Error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', 3); // Error ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. new fn4(3, ''); // Error ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that satisfy the constraints new fn4('', 3); new fn4(3, ''); // Error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new fn4(3, undefined); // Error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', null); // Generic overloads with constraints called with type arguments that do not satisfy the constraints new fn4(null, null); // Error ~~~~~~~ -!!! Type 'boolean' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'boolean' does not satisfy the constraint 'string'. ~~~~ -!!! Type 'Date' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'Date' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints new fn4(true, null); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. new fn4(null, true); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. // Non - generic overloads where contextual typing of function arguments has errors class fn5 { @@ -128,11 +148,11 @@ } new fn5((n) => n.toFixed()); ~~~~~~~ -!!! Property 'toFixed' does not exist on type 'string'. +!!! error TS2339: Property 'toFixed' does not exist on type 'string'. new fn5((n) => n.substr(0)); new fn5((n) => n.blah); // Error ~~~~ -!!! Property 'blah' does not exist on type 'string'. +!!! error TS2339: Property 'blah' does not exist on type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionConstructors.errors.txt b/tests/baselines/reference/overloadResolutionConstructors.errors.txt index 96dd65c0710..0cbaec65c13 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionConstructors.errors.txt @@ -1,3 +1,22 @@ +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(27,9): error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(43,15): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(67,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(77,9): error TS2344: Type 'string' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(77,17): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(77,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(78,9): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(78,17): error TS2344: Type 'string' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(78,25): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(79,9): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(79,17): error TS2344: Type 'string' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(88,9): error TS2344: Type 'boolean' does not satisfy the constraint 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(88,18): error TS2344: Type 'Date' does not satisfy the constraint 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(91,9): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(92,15): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(100,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(100,26): error TS2339: Property 'toFixed' does not exist on type 'string'. + + ==== tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts (17 errors) ==== class SomeBase { private n; @@ -27,7 +46,7 @@ // No candidate overloads found new fn1({}); // Error ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments interface fn2 { @@ -45,7 +64,7 @@ // Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments new fn2('', 0); // Error ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. // Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments new fn2('', 0); // OK @@ -71,7 +90,7 @@ // Generic overloads with differing arity called with type argument count that doesn't match any overload new fn3(); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. // Generic overloads with constraints called with type arguments that satisfy the constraints interface fn4 { @@ -83,23 +102,23 @@ new fn4('', 3); new fn4(3, ''); // Error ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', 3); // Error ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. new fn4(3, ''); ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that satisfy the constraints new fn4('', 3); @@ -110,17 +129,17 @@ // Generic overloads with constraints called with type arguments that do not satisfy the constraints new fn4(null, null); // Error ~~~~~~~ -!!! Type 'boolean' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'boolean' does not satisfy the constraint 'string'. ~~~~ -!!! Type 'Date' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'Date' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints new fn4(true, null); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. new fn4(null, true); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors interface fn5 { @@ -130,8 +149,8 @@ var fn5: fn5; var n = new fn5((n) => n.toFixed()); ~ -!!! Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. ~~~~~~~ -!!! Property 'toFixed' does not exist on type 'string'. +!!! error TS2339: Property 'toFixed' does not exist on type 'string'. var s = new fn5((n) => n.substr(0)); \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.errors.txt b/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.errors.txt index c9935140818..1922df6852a 100644 --- a/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.errors.txt +++ b/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/overloadResolutionOnDefaultConstructor1.ts(3,16): error TS2346: Supplied parameters do not match any signature of call target. + + ==== tests/cases/compiler/overloadResolutionOnDefaultConstructor1.ts (1 errors) ==== class Bar { public clone() { return new Bar(0); ~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. } } \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt b/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt index bd11102dfdd..03901cf67a4 100644 --- a/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt +++ b/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt @@ -1,5 +1,8 @@ +tests/cases/compiler/overloadResolutionOverCTLambda.ts(2,5): error TS2345: Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'. + + ==== tests/cases/compiler/overloadResolutionOverCTLambda.ts (1 errors) ==== function foo(b: (item: number) => boolean) { } foo(a => a); // can not convert (number)=>bool to (number)=>number ~~~~~~ -!!! Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'. \ No newline at end of file +!!! error TS2345: Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionTest1.errors.txt b/tests/baselines/reference/overloadResolutionTest1.errors.txt index c8b65902d26..6e9be0cc516 100644 --- a/tests/baselines/reference/overloadResolutionTest1.errors.txt +++ b/tests/baselines/reference/overloadResolutionTest1.errors.txt @@ -1,3 +1,15 @@ +tests/cases/compiler/overloadResolutionTest1.ts(8,16): error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. + Type '{ a: string; }' is not assignable to type '{ a: boolean; }': + Types of property 'a' are incompatible: + Type 'string' is not assignable to type 'boolean'. +tests/cases/compiler/overloadResolutionTest1.ts(19,15): error TS2345: Argument of type '{ a: string; }' is not assignable to parameter of type '{ a: boolean; }'. + Types of property 'a' are incompatible: + Type 'string' is not assignable to type 'boolean'. +tests/cases/compiler/overloadResolutionTest1.ts(25,14): error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type '{ a: string; }'. + Types of property 'a' are incompatible: + Type 'boolean' is not assignable to type 'string'. + + ==== tests/cases/compiler/overloadResolutionTest1.ts (3 errors) ==== function foo(bar:{a:number;}[]):string; @@ -8,10 +20,10 @@ var x11 = foo([{a:0}]); // works var x111 = foo([{a:"s"}]); // error - does not match any signature ~~~~~~~~~ -!!! Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! Type '{ a: string; }' is not assignable to type '{ a: boolean; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. +!!! error TS2345: Type '{ a: string; }' is not assignable to type '{ a: boolean; }': +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'boolean'. var x1111 = foo([{a:null}]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string @@ -24,9 +36,9 @@ var x3 = foo2({a:true}); // works var x4 = foo2({a:"s"}); // error ~~~~~~~ -!!! Argument of type '{ a: string; }' is not assignable to parameter of type '{ a: boolean; }'. -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2345: Argument of type '{ a: string; }' is not assignable to parameter of type '{ a: boolean; }'. +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'boolean'. function foo4(bar:{a:number;}):number; @@ -34,6 +46,6 @@ function foo4(bar:{a:any;}):any{ return bar }; var x = foo4({a:true}); // error ~~~~~~~~ -!!! Argument of type '{ a: boolean; }' is not assignable to parameter of type '{ a: string; }'. -!!! Types of property 'a' are incompatible: -!!! Type 'boolean' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type '{ a: string; }'. +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstants1.errors.txt b/tests/baselines/reference/overloadingOnConstants1.errors.txt index f523160803c..bc277dc0795 100644 --- a/tests/baselines/reference/overloadingOnConstants1.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants1.errors.txt @@ -1,3 +1,13 @@ +tests/cases/compiler/overloadingOnConstants1.ts(22,5): error TS2322: Type 'Base' is not assignable to type 'Derived1': + Property 'bar' is missing in type 'Base'. +tests/cases/compiler/overloadingOnConstants1.ts(23,5): error TS2322: Type 'Derived1' is not assignable to type 'Derived3': + Property 'biz' is missing in type 'Derived1'. +tests/cases/compiler/overloadingOnConstants1.ts(24,5): error TS2322: Type 'Derived2' is not assignable to type 'Derived1': + Property 'bar' is missing in type 'Derived2'. +tests/cases/compiler/overloadingOnConstants1.ts(25,5): error TS2322: Type 'Derived3' is not assignable to type 'Derived1': + Property 'bar' is missing in type 'Derived3'. + + ==== tests/cases/compiler/overloadingOnConstants1.ts (4 errors) ==== class Base { foo() { } } class Derived1 extends Base { bar() { } } @@ -22,17 +32,17 @@ // these are errors var htmlElement2: Derived1 = d2.createElement("yo") ~~~~~~~~~~~~ -!!! Type 'Base' is not assignable to type 'Derived1': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'Derived1': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var htmlCanvasElement2: Derived3 = d2.createElement("canvas"); ~~~~~~~~~~~~~~~~~~ -!!! Type 'Derived1' is not assignable to type 'Derived3': -!!! Property 'biz' is missing in type 'Derived1'. +!!! error TS2322: Type 'Derived1' is not assignable to type 'Derived3': +!!! error TS2322: Property 'biz' is missing in type 'Derived1'. var htmlDivElement2: Derived1 = d2.createElement("div"); ~~~~~~~~~~~~~~~ -!!! Type 'Derived2' is not assignable to type 'Derived1': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived1': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. var htmlSpanElement2: Derived1 = d2.createElement("span"); ~~~~~~~~~~~~~~~~ -!!! Type 'Derived3' is not assignable to type 'Derived1': -!!! Property 'bar' is missing in type 'Derived3'. \ No newline at end of file +!!! error TS2322: Type 'Derived3' is not assignable to type 'Derived1': +!!! error TS2322: Property 'bar' is missing in type 'Derived3'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstants2.errors.txt b/tests/baselines/reference/overloadingOnConstants2.errors.txt index a79428f70b6..1d7d2c8ecab 100644 --- a/tests/baselines/reference/overloadingOnConstants2.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants2.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/overloadingOnConstants2.ts(8,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstants2.ts(9,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstants2.ts(15,13): error TS2345: Argument of type 'string' is not assignable to parameter of type '"bye"'. +tests/cases/compiler/overloadingOnConstants2.ts(19,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + ==== tests/cases/compiler/overloadingOnConstants2.ts (4 errors) ==== class C { private x = 1; @@ -8,10 +14,10 @@ } function foo(x: "hi", items: string[]): D; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: "bye", items: string[]): E; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: string, items: string[]): C { return null; } @@ -19,13 +25,13 @@ var b: E = foo("bye", []); // E var c = foo("um", []); // error ~~~~ -!!! Argument of type 'string' is not assignable to parameter of type '"bye"'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"bye"'. //function bar(x: "hi", items: string[]): D; function bar(x: "bye", items: string[]): E; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function bar(x: string, items: string[]): C; function bar(x: string, items: string[]): C { return null; diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt b/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt index 6313010ef8c..e3a8bb08628 100644 --- a/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt @@ -1,12 +1,17 @@ +tests/cases/compiler/overloadingOnConstantsInImplementation.ts(1,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstantsInImplementation.ts(2,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstantsInImplementation.ts(3,1): error TS2381: A signature with an implementation cannot use a string literal type. + + ==== tests/cases/compiler/overloadingOnConstantsInImplementation.ts (3 errors) ==== function foo(a: 'hi', x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: any) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ -!!! A signature with an implementation cannot use a string literal type. \ No newline at end of file +!!! error TS2381: A signature with an implementation cannot use a string literal type. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt index 2d8832f67da..7d101598129 100644 --- a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt +++ b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt @@ -1,34 +1,50 @@ +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(2,3): error TS1129: Statement expected. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,3): error TS1129: Statement expected. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,19): error TS1005: ',' expected. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,3): error TS1129: Statement expected. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,20): error TS1109: Expression expected. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(2,10): error TS2304: Cannot find name 'test'. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,10): error TS2304: Cannot find name 'test'. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,15): error TS2304: Cannot find name 'name'. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,20): error TS2304: Cannot find name 'string'. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,10): error TS2304: Cannot find name 'test'. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,15): error TS2304: Cannot find name 'name'. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,21): error TS2304: Cannot find name 'any'. + + ==== tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts (14 errors) ==== function boo { ~ -!!! '(' expected. +!!! error TS1005: '(' expected. static test() ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~~~ -!!! Cannot find name 'test'. +!!! error TS2304: Cannot find name 'test'. static test(name:string) ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~~~ -!!! Cannot find name 'test'. +!!! error TS2304: Cannot find name 'test'. ~~~~ -!!! Cannot find name 'name'. +!!! error TS2304: Cannot find name 'name'. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. static test(name?:any){ } ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~ -!!! Cannot find name 'test'. +!!! error TS2304: Cannot find name 'test'. ~~~~ -!!! Cannot find name 'name'. +!!! error TS2304: Cannot find name 'name'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index 58472a41414..e41557a2903 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt @@ -1,3 +1,11 @@ +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,5): error TS2323: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,37): error TS2345: Argument of type 'D' is not assignable to parameter of type 'A'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,27): error TS2345: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,38): error TS2344: Type 'D' does not satisfy the constraint 'A'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,27): error TS2345: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,12): error TS2344: Type 'D' does not satisfy the constraint 'A'. + + ==== tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts (6 errors) ==== interface A { x } interface B { x; y } @@ -14,25 +22,25 @@ var result: number = foo(x => new G(x)); // No error, returns number ~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. ~ -!!! Argument of type 'D' is not assignable to parameter of type 'A'. +!!! error TS2345: Argument of type 'D' is not assignable to parameter of type 'A'. var result2: number = foo(x => new G(x)); // No error, returns number ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +!!! error TS2345: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. ~~~~~~~~ -!!! Type 'D' does not satisfy the constraint 'A'. +!!! error TS2344: Type 'D' does not satisfy the constraint 'A'. var result3: string = foo(x => { // returns string because the C overload is picked ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var y: G; // error that C does not satisfy constraint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ -!!! Type 'D' does not satisfy the constraint 'A'. +!!! error TS2344: Type 'D' does not satisfy the constraint 'A'. return y; ~~~~~~~~~~~~~ }); ~ -!!! Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +!!! error TS2345: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.errors.txt b/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.errors.txt index 3b9543f50cc..64faaf7e8c1 100644 --- a/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.errors.txt +++ b/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.errors.txt @@ -1,3 +1,8 @@ +tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts(5,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts(6,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts(6,1): error TS2350: Only a void function can be called with the 'new' keyword. + + ==== tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts (3 errors) ==== declare function Callbacks(flags?: string): void; declare function Callbacks(flags?: string): void; @@ -5,9 +10,9 @@ Callbacks('s'); // wrong number of type arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. new Callbacks('s'); // wrong number of type arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. \ No newline at end of file +!!! error TS2350: Only a void function can be called with the 'new' keyword. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.errors.txt b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.errors.txt index 06bd4d0f62d..20da9c71371 100644 --- a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.errors.txt +++ b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/overloadsInDifferentContainersDisagreeOnAmbient.ts(7,21): error TS2384: Overload signatures must all be ambient or non-ambient. + + ==== tests/cases/compiler/overloadsInDifferentContainersDisagreeOnAmbient.ts (1 errors) ==== declare module M { // Error because body is not ambient and this overload is @@ -7,5 +10,5 @@ module M { export function f() { } ~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt index 2e44fc1df69..021c5be324c 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt @@ -1,3 +1,9 @@ +tests/cases/compiler/overloadsWithProvisionalErrors.ts(6,6): error TS2345: Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. +tests/cases/compiler/overloadsWithProvisionalErrors.ts(7,17): error TS2304: Cannot find name 'blah'. +tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,6): error TS2345: Argument of type '(s: string) => { a: unknown; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. +tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cannot find name 'blah'. + + ==== tests/cases/compiler/overloadsWithProvisionalErrors.ts (4 errors) ==== var func: { (s: string): number; @@ -6,12 +12,12 @@ func(s => ({})); // Error for no applicable overload (object type is missing a and b) ~~~~~~~~~ -!!! Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. +!!! error TS2345: Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. func(s => ({ a: blah, b: 3 })); // Only error inside the function, but not outside (since it would be applicable if not for the provisional error) ~~~~ -!!! Cannot find name 'blah'. +!!! error TS2304: Cannot find name 'blah'. func(s => ({ a: blah })); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway ~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(s: string) => { a: unknown; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. +!!! error TS2345: Argument of type '(s: string) => { a: unknown; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. ~~~~ -!!! Cannot find name 'blah'. \ No newline at end of file +!!! error TS2304: Cannot find name 'blah'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsWithinClasses.errors.txt b/tests/baselines/reference/overloadsWithinClasses.errors.txt index c67bba61626..1055290316c 100644 --- a/tests/baselines/reference/overloadsWithinClasses.errors.txt +++ b/tests/baselines/reference/overloadsWithinClasses.errors.txt @@ -1,3 +1,6 @@ +tests/cases/compiler/overloadsWithinClasses.ts(5,5): error TS2393: Duplicate function implementation. + + ==== tests/cases/compiler/overloadsWithinClasses.ts (1 errors) ==== class foo { @@ -5,7 +8,7 @@ static fnOverload(foo: string){ } // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. } diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt b/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt index 0e7200d122d..87fddf0ac86 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt +++ b/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt @@ -1,3 +1,7 @@ +tests/cases/compiler/overridingPrivateStaticMembers.ts(5,7): error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': + Private property 'y' cannot be reimplemented. + + ==== tests/cases/compiler/overridingPrivateStaticMembers.ts (1 errors) ==== class Base2 { private static y: { foo: string }; @@ -5,7 +9,7 @@ class Derived2 extends Base2 { ~~~~~~~~ -!!! Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': -!!! Private property 'y' cannot be reimplemented. +!!! error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': +!!! error TS2418: Private property 'y' cannot be reimplemented. private static y: { foo: string; bar: string; }; } \ No newline at end of file diff --git a/tests/baselines/reference/paramPropertiesInSignatures.errors.txt b/tests/baselines/reference/paramPropertiesInSignatures.errors.txt index 46ac90581e9..89d2ea67bc3 100644 --- a/tests/baselines/reference/paramPropertiesInSignatures.errors.txt +++ b/tests/baselines/reference/paramPropertiesInSignatures.errors.txt @@ -1,22 +1,29 @@ +tests/cases/compiler/paramPropertiesInSignatures.ts(2,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/paramPropertiesInSignatures.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/paramPropertiesInSignatures.ts(8,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/paramPropertiesInSignatures.ts(9,14): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/paramPropertiesInSignatures.ts(10,14): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/paramPropertiesInSignatures.ts (5 errors) ==== class C1 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private p2:number); // ERROR ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public p3:any) {} // OK } declare class C2 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private p2:number); // ERROR ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public p3:any); // ERROR ~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/parameterPropertyInConstructor1.errors.txt b/tests/baselines/reference/parameterPropertyInConstructor1.errors.txt index 2394b91104e..c191073277f 100644 --- a/tests/baselines/reference/parameterPropertyInConstructor1.errors.txt +++ b/tests/baselines/reference/parameterPropertyInConstructor1.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/parameterPropertyInConstructor1.ts(3,17): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/parameterPropertyInConstructor1.ts (1 errors) ==== declare module mod { class Customers { constructor(public names: string); ~~~~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } } \ No newline at end of file diff --git a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt index deb9806812b..d1a0513c1f6 100644 --- a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt +++ b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt @@ -1,14 +1,19 @@ +tests/cases/compiler/parameterPropertyInConstructor2.ts(3,5): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/parameterPropertyInConstructor2.ts(3,17): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/compiler/parameterPropertyInConstructor2.ts(4,24): error TS2300: Duplicate identifier 'names'. + + ==== tests/cases/compiler/parameterPropertyInConstructor2.ts (3 errors) ==== module mod { class Customers { constructor(public names: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. ~~~~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public names: string, public ages: number) { ~~~~~ -!!! Duplicate identifier 'names'. +!!! error TS2300: Duplicate identifier 'names'. } } } diff --git a/tests/baselines/reference/parameterPropertyOutsideConstructor.errors.txt b/tests/baselines/reference/parameterPropertyOutsideConstructor.errors.txt index 316a71a37b9..1073cf9164d 100644 --- a/tests/baselines/reference/parameterPropertyOutsideConstructor.errors.txt +++ b/tests/baselines/reference/parameterPropertyOutsideConstructor.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/parameterPropertyOutsideConstructor.ts(2,9): error TS2369: A parameter property is only allowed in a constructor implementation. + + ==== tests/cases/compiler/parameterPropertyOutsideConstructor.ts (1 errors) ==== class C { foo(public x) { ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } } \ No newline at end of file diff --git a/tests/baselines/reference/parse1.errors.txt b/tests/baselines/reference/parse1.errors.txt index b2c9a06efe6..03c35f18633 100644 --- a/tests/baselines/reference/parse1.errors.txt +++ b/tests/baselines/reference/parse1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/parse1.ts(4,1): error TS1003: Identifier expected. + + ==== tests/cases/compiler/parse1.ts (1 errors) ==== var bar = 42; function foo() { bar. } ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/parse2.errors.txt b/tests/baselines/reference/parse2.errors.txt index f7d424001ca..cef03437430 100644 --- a/tests/baselines/reference/parse2.errors.txt +++ b/tests/baselines/reference/parse2.errors.txt @@ -1,6 +1,9 @@ +tests/cases/compiler/parse2.ts(3,1): error TS1135: Argument expression expected. + + ==== tests/cases/compiler/parse2.ts (1 errors) ==== function foo() { foo( } ~ -!!! Argument expression expected. \ No newline at end of file +!!! error TS1135: Argument expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/parseTypes.errors.txt b/tests/baselines/reference/parseTypes.errors.txt index 49b9218320c..96d004c5b01 100644 --- a/tests/baselines/reference/parseTypes.errors.txt +++ b/tests/baselines/reference/parseTypes.errors.txt @@ -1,3 +1,10 @@ +tests/cases/compiler/parseTypes.ts(9,1): error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. +tests/cases/compiler/parseTypes.ts(10,1): error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. +tests/cases/compiler/parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }': + Index signature is missing in type '(s: string) => void'. +tests/cases/compiler/parseTypes.ts(12,1): error TS2323: Type '(s: string) => void' is not assignable to type 'new () => number'. + + ==== tests/cases/compiler/parseTypes.ts (4 errors) ==== var x = <() => number>null; @@ -9,15 +16,15 @@ y=f; y=g; ~ -!!! Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. x=g; ~ -!!! Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. w=g; ~ -!!! Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }': -!!! Index signature is missing in type '(s: string) => void'. +!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }': +!!! error TS2322: Index signature is missing in type '(s: string) => void'. z=g; ~ -!!! Type '(s: string) => void' is not assignable to type 'new () => number'. +!!! error TS2323: Type '(s: string) => void' is not assignable to type 'new () => number'. \ No newline at end of file diff --git a/tests/baselines/reference/parser0_004152.errors.txt b/tests/baselines/reference/parser0_004152.errors.txt index 551d6aab5c2..e1b19738922 100644 --- a/tests/baselines/reference/parser0_004152.errors.txt +++ b/tests/baselines/reference/parser0_004152.errors.txt @@ -1,73 +1,109 @@ +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,45): error TS1137: Expression or comma expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,46): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,49): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,52): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,55): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,58): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,61): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,64): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,67): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,70): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,73): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,76): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,79): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,82): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,85): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,86): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,94): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,97): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,98): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,28): error TS2304: Cannot find name 'DisplayPosition'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,51): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,54): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,57): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,60): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,66): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,69): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,72): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,75): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,78): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,81): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,84): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,96): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(3,25): error TS2304: Cannot find name 'SeedCoords'. + + ==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (34 errors) ==== export class Game { ~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. private position = new DisplayPosition([), 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 0], NoMove, 0); ~ -!!! Expression or comma expected. +!!! error TS1137: Expression or comma expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~~~~~~~~~~~~~~~ -!!! Cannot find name 'DisplayPosition'. +!!! error TS2304: Cannot find name 'DisplayPosition'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. private prevConfig: SeedCoords[][]; ~~~~~~~~~~ -!!! Cannot find name 'SeedCoords'. +!!! error TS2304: Cannot find name 'SeedCoords'. } \ 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 4ed4b8b2635..459ad40ab72 100644 --- a/tests/baselines/reference/parser10.1.1-8gs.errors.txt +++ b/tests/baselines/reference/parser10.1.1-8gs.errors.txt @@ -1,3 +1,9 @@ +tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,5): error TS1134: Variable declaration expected. +tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,12): error TS1134: Variable declaration expected. +tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,14): error TS1134: Variable declaration expected. +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 (4 errors) ==== /// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set @@ -16,12 +22,12 @@ "use strict"; throw NotEarlyError; ~~~~~~~~~~~~~ -!!! Cannot find name 'NotEarlyError'. +!!! error TS2304: Cannot find name 'NotEarlyError'. var public = 1; ~~~~~~ -!!! Variable declaration expected. +!!! error TS1134: Variable declaration expected. ~ -!!! Variable declaration expected. +!!! error TS1134: Variable declaration expected. ~ -!!! Variable declaration expected. +!!! error TS1134: Variable declaration expected. \ No newline at end of file diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt index 694dc1ac57a..ab9bab7890c 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt +++ b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt @@ -1,3 +1,6 @@ +tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error TS2304: Cannot find name 'runTestCase'. + + ==== tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts (1 errors) ==== /// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set @@ -25,5 +28,5 @@ } runTestCase(testcase); ~~~~~~~~~~~ -!!! Cannot find name 'runTestCase'. +!!! error TS2304: Cannot find name 'runTestCase'. \ No newline at end of file diff --git a/tests/baselines/reference/parser509534.errors.txt b/tests/baselines/reference/parser509534.errors.txt index e40d485cb60..78d56d1413e 100644 --- a/tests/baselines/reference/parser509534.errors.txt +++ b/tests/baselines/reference/parser509534.errors.txt @@ -1,11 +1,15 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts(2,14): error TS2304: Cannot find name 'require'. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts(3,1): error TS2304: Cannot find name 'module'. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts (2 errors) ==== "use strict"; var config = require("../config"); ~~~~~~~ -!!! Cannot find name 'require'. +!!! error TS2304: Cannot find name 'require'. module.exports.route = function (server) { ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. // General Login Page server.get(config.env.siteRoot + "/auth/login", function (req, res, next) { diff --git a/tests/baselines/reference/parser509546.errors.txt b/tests/baselines/reference/parser509546.errors.txt index e3e361e6c69..ad8bf69dc12 100644 --- a/tests/baselines/reference/parser509546.errors.txt +++ b/tests/baselines/reference/parser509546.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts (1 errors) ==== export class Logger { ~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser509546_1.errors.txt b/tests/baselines/reference/parser509546_1.errors.txt index 3bc50baa001..2620036c5b6 100644 --- a/tests/baselines/reference/parser509546_1.errors.txt +++ b/tests/baselines/reference/parser509546_1.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts (1 errors) ==== export class Logger { ~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser509546_2.errors.txt b/tests/baselines/reference/parser509546_2.errors.txt index 08b4b95260d..f945ccaac00 100644 --- a/tests/baselines/reference/parser509546_2.errors.txt +++ b/tests/baselines/reference/parser509546_2.errors.txt @@ -1,9 +1,12 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts (1 errors) ==== "use strict"; export class Logger { ~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser509618.errors.txt b/tests/baselines/reference/parser509618.errors.txt index 84ea778e0ca..fdc66573617 100644 --- a/tests/baselines/reference/parser509618.errors.txt +++ b/tests/baselines/reference/parser509618.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509618.ts(2,20): error TS1036: Statements are not allowed in ambient contexts. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509618.ts (1 errors) ==== declare module ambiModule { interface i1 { }; ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/parser509630.errors.txt b/tests/baselines/reference/parser509630.errors.txt index 72be30146de..29e79f6522a 100644 --- a/tests/baselines/reference/parser509630.errors.txt +++ b/tests/baselines/reference/parser509630.errors.txt @@ -1,9 +1,12 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509630.ts(3,1): error TS1137: Expression or comma expected. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509630.ts (1 errors) ==== class Type { public examples = [ // typing here } ~ -!!! Expression or comma expected. +!!! error TS1137: Expression or comma expected. class Any extends Type { } \ No newline at end of file diff --git a/tests/baselines/reference/parser509667.errors.txt b/tests/baselines/reference/parser509667.errors.txt index 684616da419..86dd7178b0f 100644 --- a/tests/baselines/reference/parser509667.errors.txt +++ b/tests/baselines/reference/parser509667.errors.txt @@ -1,10 +1,13 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509667.ts(4,4): error TS1003: Identifier expected. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509667.ts (1 errors) ==== class Foo { f1() { if (this. } ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. f2() { } diff --git a/tests/baselines/reference/parser509668.errors.txt b/tests/baselines/reference/parser509668.errors.txt index 36dc0523dd2..5ea380592ef 100644 --- a/tests/baselines/reference/parser509668.errors.txt +++ b/tests/baselines/reference/parser509668.errors.txt @@ -1,7 +1,10 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509668.ts(3,23): error TS1005: ',' expected. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509668.ts (1 errors) ==== class Foo3 { // Doesn't work, but should constructor (public ...args: string[]) { } ~~~ -!!! ',' expected. +!!! error TS1005: ',' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/parser509669.errors.txt b/tests/baselines/reference/parser509669.errors.txt index 05ce0f609e3..b943c20fcef 100644 --- a/tests/baselines/reference/parser509669.errors.txt +++ b/tests/baselines/reference/parser509669.errors.txt @@ -1,6 +1,9 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509669.ts(2,17): error TS1005: '=>' expected. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509669.ts (1 errors) ==== function foo():any { return ():void {}; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/parser509693.errors.txt b/tests/baselines/reference/parser509693.errors.txt index dd1aa4b120f..b910af1c2e6 100644 --- a/tests/baselines/reference/parser509693.errors.txt +++ b/tests/baselines/reference/parser509693.errors.txt @@ -1,6 +1,10 @@ +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts(1,6): error TS2304: Cannot find name 'module'. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts(1,22): error TS2304: Cannot find name 'module'. + + ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts (2 errors) ==== if (!module.exports) module.exports = ""; ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. ~~~~~~ -!!! Cannot find name 'module'. \ No newline at end of file +!!! error TS2304: Cannot find name 'module'. \ No newline at end of file diff --git a/tests/baselines/reference/parser509698.errors.txt b/tests/baselines/reference/parser509698.errors.txt index 8a8b23d44e4..2aaaec18dc2 100644 --- a/tests/baselines/reference/parser509698.errors.txt +++ b/tests/baselines/reference/parser509698.errors.txt @@ -1,11 +1,21 @@ -!!! Cannot find global type 'Array'. -!!! Cannot find global type 'Boolean'. -!!! Cannot find global type 'Function'. -!!! Cannot find global type 'IArguments'. -!!! Cannot find global type 'Number'. -!!! Cannot find global type 'Object'. -!!! Cannot find global type 'RegExp'. -!!! Cannot find global type 'String'. +error TS2318: Cannot find global type 'Array'. +error TS2318: Cannot find global type 'Boolean'. +error TS2318: Cannot find global type 'Function'. +error TS2318: Cannot find global type 'IArguments'. +error TS2318: Cannot find global type 'Number'. +error TS2318: Cannot find global type 'Object'. +error TS2318: Cannot find global type 'RegExp'. +error TS2318: Cannot find global type 'String'. + + +!!! error TS2318: Cannot find global type 'Array'. +!!! error TS2318: Cannot find global type 'Boolean'. +!!! error TS2318: Cannot find global type 'Function'. +!!! error TS2318: Cannot find global type 'IArguments'. +!!! error TS2318: Cannot find global type 'Number'. +!!! error TS2318: Cannot find global type 'Object'. +!!! error TS2318: Cannot find global type 'RegExp'. +!!! error TS2318: Cannot find global type 'String'. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509698.ts (0 errors) ==== ///