From baef38c3d6a05b03ca2fb0fd0e0151d8497ae33e Mon Sep 17 00:00:00 2001 From: Tony Ho Date: Sun, 21 Oct 2018 21:08:33 +1100 Subject: [PATCH 1/3] Improve error message when comparing non-comparable types --- src/compiler/checker.ts | 3 +-- src/compiler/diagnosticMessages.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6385d150a3e8e..a248849352a1a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -22834,10 +22834,9 @@ namespace ts { switch (operatorToken.kind) { case SyntaxKind.EqualsEqualsEqualsToken: case SyntaxKind.EqualsEqualsToken: - return error(errNode, Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap, "false", leftStr, rightStr); case SyntaxKind.ExclamationEqualsEqualsToken: case SyntaxKind.ExclamationEqualsToken: - return error(errNode, Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap, "true", leftStr, rightStr); + return error(errNode, Diagnostics.Comparison_of_expressions_of_types_0_and_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_one_of_the_expressions_to_unknown_first, leftStr, rightStr); } return undefined; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f2ea315e03963..018390fdba79f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1292,7 +1292,7 @@ "category": "Error", "code": 2366 }, - "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.": { + "Comparison of expressions of types '{0}' and '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first.": { "category": "Error", "code": 2367 }, From af7d72f0c15c87ec735795d4a70e88459adc4ea0 Mon Sep 17 00:00:00 2001 From: Tony Ho Date: Sun, 27 Jan 2019 14:47:59 +1100 Subject: [PATCH 2/3] Update tests --- src/testRunner/unittests/tsserver/skipLibCheck.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/testRunner/unittests/tsserver/skipLibCheck.ts b/src/testRunner/unittests/tsserver/skipLibCheck.ts index d154154f0830c..d444cee9199f9 100644 --- a/src/testRunner/unittests/tsserver/skipLibCheck.ts +++ b/src/testRunner/unittests/tsserver/skipLibCheck.ts @@ -167,7 +167,7 @@ namespace ts.projectSystem { ); const errorResult = session.executeCommand(getErrRequest).response; assert.isTrue(errorResult.length === 1); - assert.equal(errorResult[0].code, Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap.code); + assert.equal(errorResult[0].code, Diagnostics.Comparison_of_expressions_of_types_0_and_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_one_of_the_expressions_to_unknown_first.code); }); it("should report semantic errors for configured js project with '// @ts-check' and skipLibCheck=true", () => { @@ -194,7 +194,7 @@ namespace ts.projectSystem { ); const errorResult = session.executeCommand(getErrRequest).response; assert.isTrue(errorResult.length === 1); - assert.equal(errorResult[0].code, Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap.code); + assert.equal(errorResult[0].code, Diagnostics.Comparison_of_expressions_of_types_0_and_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_one_of_the_expressions_to_unknown_first.code); }); it("should report semantic errors for configured js project with checkJs=true and skipLibCheck=true", () => { @@ -223,7 +223,7 @@ namespace ts.projectSystem { ); const errorResult = session.executeCommand(getErrRequest).response; assert.isTrue(errorResult.length === 1); - assert.equal(errorResult[0].code, Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap.code); + assert.equal(errorResult[0].code, Diagnostics.Comparison_of_expressions_of_types_0_and_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_one_of_the_expressions_to_unknown_first.code); }); }); } From 91f0dc54ffb2c8f9e7142c92f17be0c83b3b22df Mon Sep 17 00:00:00 2001 From: Tony Ho Date: Sun, 27 Jan 2019 14:48:21 +1100 Subject: [PATCH 3/3] Accept new baselines --- .../capturedLetConstInLoop5.errors.txt | 8 +- .../capturedLetConstInLoop5_ES6.errors.txt | 8 +- .../capturedLetConstInLoop6.errors.txt | 16 +- .../capturedLetConstInLoop6_ES6.errors.txt | 16 +- .../capturedLetConstInLoop7.errors.txt | 32 +- .../capturedLetConstInLoop7_ES6.errors.txt | 32 +- .../capturedLetConstInLoop8.errors.txt | 64 ++-- .../capturedLetConstInLoop8_ES6.errors.txt | 64 ++-- ...ationshipObjectsOnCallSignature.errors.txt | 192 ++++++------ ...ipObjectsOnConstructorSignature.errors.txt | 192 ++++++------ ...tionshipObjectsOnIndexSignature.errors.txt | 96 +++--- ...onshipObjectsOnOptionalProperty.errors.txt | 32 +- ...NoRelationshipObjectsOnProperty.errors.txt | 64 ++-- ...WithNoRelationshipPrimitiveType.errors.txt | 288 +++++++++--------- ...WithNoRelationshipTypeParameter.errors.txt | 16 +- ...arisonOperatorWithTypeParameter.errors.txt | 64 ++-- .../discriminatedUnionTypes1.errors.txt | 4 +- .../reference/enumLiteralTypes3.errors.txt | 12 +- ...equalityWithIntersectionTypes01.errors.txt | 32 +- tests/baselines/reference/expr.errors.txt | 28 +- .../for-inStatementsArrayErrors.errors.txt | 4 +- .../infinitelyExpandingTypes1.errors.txt | 4 +- .../numberVsBigIntOperations.errors.txt | 16 +- .../reference/numericLiteralTypes3.errors.txt | 36 +-- .../stringEnumLiteralTypes3.errors.txt | 12 +- ...eralTypesWithVariousOperators02.errors.txt | 8 +- ...sertionsInEqualityComparisons02.errors.txt | 8 +- ...ingLiteralsWithEqualityChecks01.errors.txt | 24 +- ...ingLiteralsWithEqualityChecks02.errors.txt | 24 +- ...ingLiteralsWithEqualityChecks03.errors.txt | 8 +- ...ingLiteralsWithEqualityChecks04.errors.txt | 8 +- ...gLiteralsWithSwitchStatements02.errors.txt | 8 +- .../reference/symbolType9.errors.txt | 16 +- ...FormTypeOfEqualEqualHasNoEffect.errors.txt | 4 +- ...OfFormTypeOfNotEqualHasNoEffect.errors.txt | 4 +- .../typeGuardOfFormTypeOfOther.errors.txt | 32 +- .../baselines/reference/typeMatch1.errors.txt | 4 +- 37 files changed, 740 insertions(+), 740 deletions(-) diff --git a/tests/baselines/reference/capturedLetConstInLoop5.errors.txt b/tests/baselines/reference/capturedLetConstInLoop5.errors.txt index 7ae1e69be63df..6e7baf7b9b917 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop5.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/capturedLetConstInLoop5.ts(174,13): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop5.ts(229,13): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +tests/cases/compiler/capturedLetConstInLoop5.ts(174,13): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop5.ts(229,13): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/capturedLetConstInLoop5.ts (2 errors) ==== @@ -178,7 +178,7 @@ tests/cases/compiler/capturedLetConstInLoop5.ts(229,13): error TS2367: This cond (() => x + v); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return; } } @@ -235,7 +235,7 @@ tests/cases/compiler/capturedLetConstInLoop5.ts(229,13): error TS2367: This cond (() => x + y + v); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return; } } diff --git a/tests/baselines/reference/capturedLetConstInLoop5_ES6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop5_ES6.errors.txt index 7d62d8db10ce2..b4b0abf86dcce 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5_ES6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop5_ES6.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/capturedLetConstInLoop5_ES6.ts(174,13): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop5_ES6.ts(229,13): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +tests/cases/compiler/capturedLetConstInLoop5_ES6.ts(174,13): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop5_ES6.ts(229,13): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/capturedLetConstInLoop5_ES6.ts (2 errors) ==== @@ -178,7 +178,7 @@ tests/cases/compiler/capturedLetConstInLoop5_ES6.ts(229,13): error TS2367: This (() => x + v); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return; } } @@ -235,7 +235,7 @@ tests/cases/compiler/capturedLetConstInLoop5_ES6.ts(229,13): error TS2367: This (() => x + y + v); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return; } } diff --git a/tests/baselines/reference/capturedLetConstInLoop6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop6.errors.txt index f0a323305d870..122791fb326b8 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/capturedLetConstInLoop6.ts(147,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6.ts(150,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6.ts(194,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6.ts(197,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +tests/cases/compiler/capturedLetConstInLoop6.ts(147,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop6.ts(150,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop6.ts(194,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop6.ts(197,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/capturedLetConstInLoop6.ts (4 errors) ==== @@ -153,12 +153,12 @@ tests/cases/compiler/capturedLetConstInLoop6.ts(197,9): error TS2367: This condi (() => x); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } } @@ -204,12 +204,12 @@ tests/cases/compiler/capturedLetConstInLoop6.ts(197,9): error TS2367: This condi (() => x + y); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } } diff --git a/tests/baselines/reference/capturedLetConstInLoop6_ES6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop6_ES6.errors.txt index 7edbf27370e0b..f992425ce13e9 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6_ES6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop6_ES6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(147,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(150,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(194,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(197,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(147,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(150,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(194,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(197,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/capturedLetConstInLoop6_ES6.ts (4 errors) ==== @@ -153,12 +153,12 @@ tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(197,9): error TS2367: This c (() => x); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } } @@ -204,12 +204,12 @@ tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(197,9): error TS2367: This c (() => x + y); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } } diff --git a/tests/baselines/reference/capturedLetConstInLoop7.errors.txt b/tests/baselines/reference/capturedLetConstInLoop7.errors.txt index 0b215dba4bf7c..14b47696a2542 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop7.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/capturedLetConstInLoop7.ts(230,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(233,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(236,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(239,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(305,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(308,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(311,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(314,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +tests/cases/compiler/capturedLetConstInLoop7.ts(230,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7.ts(233,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7.ts(236,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7.ts(239,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7.ts(305,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7.ts(308,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7.ts(311,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7.ts(314,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/capturedLetConstInLoop7.ts (8 errors) ==== @@ -240,22 +240,22 @@ tests/cases/compiler/capturedLetConstInLoop7.ts(314,9): error TS2367: This condi (() => x); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break l1_c; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l1_c; } } @@ -323,22 +323,22 @@ tests/cases/compiler/capturedLetConstInLoop7.ts(314,9): error TS2367: This condi (() => x + y); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break l5_c; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l5_c; } } diff --git a/tests/baselines/reference/capturedLetConstInLoop7_ES6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop7_ES6.errors.txt index 661afd90bb926..7c5b14d990f20 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7_ES6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop7_ES6.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(230,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(233,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(236,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(239,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(305,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(308,9): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(311,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(314,9): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(230,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(233,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(236,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(239,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(305,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(308,9): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(311,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(314,9): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/capturedLetConstInLoop7_ES6.ts (8 errors) ==== @@ -240,22 +240,22 @@ tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(314,9): error TS2367: This c (() => x); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break l1_c; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l1_c; } } @@ -323,22 +323,22 @@ tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(314,9): error TS2367: This c (() => x + y); if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break l5_c; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l5_c; } } diff --git a/tests/baselines/reference/capturedLetConstInLoop8.errors.txt b/tests/baselines/reference/capturedLetConstInLoop8.errors.txt index cf93d70a01df4..f5b3d7458f3cb 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop8.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/capturedLetConstInLoop8.ts(73,21): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(76,21): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(79,21): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(82,21): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(86,21): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(89,21): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(92,21): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(95,21): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(98,21): error TS2367: This condition will always return 'false' since the types '0' and '3' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(102,17): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(105,17): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(108,17): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(111,17): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(114,17): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(117,17): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(120,17): error TS2367: This condition will always return 'false' since the types '0' and '3' have no overlap. +tests/cases/compiler/capturedLetConstInLoop8.ts(73,21): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(76,21): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(79,21): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(82,21): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(86,21): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(89,21): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(92,21): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(95,21): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(98,21): error TS2367: Comparison of expressions of types '0' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(102,17): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(105,17): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(108,17): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(111,17): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(114,17): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(117,17): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8.ts(120,17): error TS2367: Comparison of expressions of types '0' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/capturedLetConstInLoop8.ts (16 errors) ==== @@ -91,84 +91,84 @@ tests/cases/compiler/capturedLetConstInLoop8.ts(120,17): error TS2367: This cond (() => x + y); if (y == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (y == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break l1; } if (y == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break ll1; } if (y == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l0; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l1; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue ll1; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return "123" } if (x == 3) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '3' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return; } } if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break l1; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l1; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l0; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return "456"; } if (x == 3) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '3' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return; } } diff --git a/tests/baselines/reference/capturedLetConstInLoop8_ES6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop8_ES6.errors.txt index 7181e0ec06e26..5a76ad3c13541 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8_ES6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop8_ES6.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(73,21): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(76,21): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(79,21): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(82,21): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(86,21): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(89,21): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(92,21): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(95,21): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(98,21): error TS2367: This condition will always return 'false' since the types '0' and '3' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(102,17): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(105,17): error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(108,17): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(111,17): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(114,17): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(117,17): error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(120,17): error TS2367: This condition will always return 'false' since the types '0' and '3' have no overlap. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(73,21): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(76,21): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(79,21): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(82,21): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(86,21): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(89,21): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(92,21): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(95,21): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(98,21): error TS2367: Comparison of expressions of types '0' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(102,17): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(105,17): error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(108,17): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(111,17): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(114,17): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(117,17): error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(120,17): error TS2367: Comparison of expressions of types '0' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/capturedLetConstInLoop8_ES6.ts (16 errors) ==== @@ -91,84 +91,84 @@ tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(120,17): error TS2367: This (() => x + y); if (y == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (y == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break l1; } if (y == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break ll1; } if (y == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l0; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l1; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue ll1; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return "123" } if (x == 3) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '3' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return; } } if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break; } if (x == 1) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. break l1; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l1; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. continue l0; } if (x == 2) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return "456"; } if (x == 3) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '0' and '3' have no overlap. +!!! error TS2367: Comparison of expressions of types '0' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. return; } } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt index 1ee81a4ea113f..0e81d2b68f1c7 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt @@ -46,54 +46,54 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso 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 TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(104,12): error TS2367: This condition will always return 'false' since the types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(105,12): error TS2367: This condition will always return 'false' since the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(106,12): error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and '{ fn(): C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(107,12): error TS2367: This condition will always return 'false' since the types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(108,12): error TS2367: This condition will always return 'false' since the types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(111,12): error TS2367: This condition will always return 'false' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(112,12): error TS2367: This condition will always return 'false' since the types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(113,12): error TS2367: This condition will always return 'false' since the types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(114,12): error TS2367: This condition will always return 'false' since the types '{ fn(): C; }' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(115,12): error TS2367: This condition will always return 'false' since the types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(116,12): error TS2367: This condition will always return 'false' since the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(120,12): error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(121,12): error TS2367: This condition will always return 'true' since the types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(122,12): error TS2367: This condition will always return 'true' since the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(123,12): error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and '{ fn(): C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(124,12): error TS2367: This condition will always return 'true' since the types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(125,12): error TS2367: This condition will always return 'true' since the types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(128,12): error TS2367: This condition will always return 'true' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(129,12): error TS2367: This condition will always return 'true' since the types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(130,12): error TS2367: This condition will always return 'true' since the types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(131,12): error TS2367: This condition will always return 'true' since the types '{ fn(): C; }' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(132,12): error TS2367: This condition will always return 'true' since the types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(133,12): error TS2367: This condition will always return 'true' since the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(137,12): error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(138,12): error TS2367: This condition will always return 'false' since the types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(139,12): error TS2367: This condition will always return 'false' since the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(140,12): error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and '{ fn(): C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(141,12): error TS2367: This condition will always return 'false' since the types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(142,12): error TS2367: This condition will always return 'false' since the types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(145,12): error TS2367: This condition will always return 'false' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(146,12): error TS2367: This condition will always return 'false' since the types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(147,12): error TS2367: This condition will always return 'false' since the types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(148,12): error TS2367: This condition will always return 'false' since the types '{ fn(): C; }' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(149,12): error TS2367: This condition will always return 'false' since the types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(150,12): error TS2367: This condition will always return 'false' since the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(154,12): error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(155,12): error TS2367: This condition will always return 'true' since the types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(156,12): error TS2367: This condition will always return 'true' since the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(157,12): error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and '{ fn(): C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(158,12): error TS2367: This condition will always return 'true' since the types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(159,12): error TS2367: This condition will always return 'true' since the types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(162,12): error TS2367: This condition will always return 'true' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(163,12): error TS2367: This condition will always return 'true' since the types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(164,12): error TS2367: This condition will always return 'true' since the types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(165,12): error TS2367: This condition will always return 'true' since the types '{ fn(): C; }' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(166,12): error TS2367: This condition will always return 'true' since the types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(167,12): error TS2367: This condition will always return 'true' since the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(103,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(104,12): error TS2367: Comparison of expressions of types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(105,12): error TS2367: Comparison of expressions of types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(106,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and '{ fn(): C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(107,12): error TS2367: Comparison of expressions of types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(108,12): error TS2367: Comparison of expressions of types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(111,12): error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(112,12): error TS2367: Comparison of expressions of types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(113,12): error TS2367: Comparison of expressions of types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(114,12): error TS2367: Comparison of expressions of types '{ fn(): C; }' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(115,12): error TS2367: Comparison of expressions of types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(116,12): error TS2367: Comparison of expressions of types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(120,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(121,12): error TS2367: Comparison of expressions of types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(122,12): error TS2367: Comparison of expressions of types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(123,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and '{ fn(): C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(124,12): error TS2367: Comparison of expressions of types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(125,12): error TS2367: Comparison of expressions of types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(128,12): error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(129,12): error TS2367: Comparison of expressions of types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(130,12): error TS2367: Comparison of expressions of types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(131,12): error TS2367: Comparison of expressions of types '{ fn(): C; }' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(132,12): error TS2367: Comparison of expressions of types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(133,12): error TS2367: Comparison of expressions of types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(137,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(138,12): error TS2367: Comparison of expressions of types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(139,12): error TS2367: Comparison of expressions of types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(140,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and '{ fn(): C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(141,12): error TS2367: Comparison of expressions of types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(142,12): error TS2367: Comparison of expressions of types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(145,12): error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(146,12): error TS2367: Comparison of expressions of types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(147,12): error TS2367: Comparison of expressions of types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(148,12): error TS2367: Comparison of expressions of types '{ fn(): C; }' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(149,12): error TS2367: Comparison of expressions of types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(150,12): error TS2367: Comparison of expressions of types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(154,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(155,12): error TS2367: Comparison of expressions of types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(156,12): error TS2367: Comparison of expressions of types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(157,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and '{ fn(): C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(158,12): error TS2367: Comparison of expressions of types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(159,12): error TS2367: Comparison of expressions of types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(162,12): error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(163,12): error TS2367: Comparison of expressions of types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(164,12): error TS2367: Comparison of expressions of types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(165,12): error TS2367: Comparison of expressions of types '{ fn(): C; }' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(166,12): error TS2367: Comparison of expressions of types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(167,12): error TS2367: Comparison of expressions of types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts (96 errors) ==== @@ -297,163 +297,163 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a2 = a2 == b2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a3 = a3 == b3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a4 = a4 == b4; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and '{ fn(): C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and '{ fn(): C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a5 = a5 == b5; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a6 = a6 == b6; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a7 = a7 == b7; var r5b1 = b1 == a1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b2 = b2 == a2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b3 = b3 == a3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b4 = b4 == a4; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(): C; }' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): C; }' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b5 = b5 == a5; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b6 = b6 == a6; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b7 = b7 == a7; // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a2 = a2 != b2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a3 = a3 != b3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a4 = a4 != b4; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and '{ fn(): C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and '{ fn(): C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a5 = a5 != b5; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a6 = a6 != b6; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a7 = a7 != b7; var r6b1 = b1 != a1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b2 = b2 != a2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b3 = b3 != a3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b4 = b4 != a4; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(): C; }' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): C; }' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b5 = b5 != a5; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b6 = b6 != a6; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b7 = b7 != a7; // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a4 = a4 === b4; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and '{ fn(): C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and '{ fn(): C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a5 = a5 === b5; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a6 = a6 === b6; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a7 = a7 === b7; var r7b1 = b1 === a1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b4 = b4 === a4; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(): C; }' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): C; }' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b5 = b5 === a5; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b6 = b6 === a6; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b7 = b7 === a7; // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a4 = a4 !== b4; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and '{ fn(): C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and '{ fn(): C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a5 = a5 !== b5; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a6 = a6 !== b6; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a7 = a7 !== b7; var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b4 = b4 !== a4; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(): C; }' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): C; }' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b5 = b5 !== a5; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b6 = b6 !== a6; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. 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 f12a649d98b42..2c0426715eb33 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt @@ -46,54 +46,54 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso 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 TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(104,12): error TS2367: This condition will always return 'false' since the types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(105,12): error TS2367: This condition will always return 'false' since the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(106,12): error TS2367: This condition will always return 'false' since the types 'new () => Base' and 'new () => C' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(107,12): error TS2367: This condition will always return 'false' since the types 'new (a?: Base) => Base' and 'new (a?: C) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(108,12): error TS2367: This condition will always return 'false' since the types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(111,12): error TS2367: This condition will always return 'false' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(112,12): error TS2367: This condition will always return 'false' since the types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(113,12): error TS2367: This condition will always return 'false' since the types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(114,12): error TS2367: This condition will always return 'false' since the types 'new () => C' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(115,12): error TS2367: This condition will always return 'false' since the types 'new (a?: C) => Base' and 'new (a?: Base) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(116,12): error TS2367: This condition will always return 'false' since the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(120,12): error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(121,12): error TS2367: This condition will always return 'true' since the types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(122,12): error TS2367: This condition will always return 'true' since the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(123,12): error TS2367: This condition will always return 'true' since the types 'new () => Base' and 'new () => C' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(124,12): error TS2367: This condition will always return 'true' since the types 'new (a?: Base) => Base' and 'new (a?: C) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(125,12): error TS2367: This condition will always return 'true' since the types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(128,12): error TS2367: This condition will always return 'true' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(129,12): error TS2367: This condition will always return 'true' since the types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(130,12): error TS2367: This condition will always return 'true' since the types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(131,12): error TS2367: This condition will always return 'true' since the types 'new () => C' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(132,12): error TS2367: This condition will always return 'true' since the types 'new (a?: C) => Base' and 'new (a?: Base) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(133,12): error TS2367: This condition will always return 'true' since the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(137,12): error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(138,12): error TS2367: This condition will always return 'false' since the types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(139,12): error TS2367: This condition will always return 'false' since the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(140,12): error TS2367: This condition will always return 'false' since the types 'new () => Base' and 'new () => C' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(141,12): error TS2367: This condition will always return 'false' since the types 'new (a?: Base) => Base' and 'new (a?: C) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(142,12): error TS2367: This condition will always return 'false' since the types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(145,12): error TS2367: This condition will always return 'false' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(146,12): error TS2367: This condition will always return 'false' since the types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(147,12): error TS2367: This condition will always return 'false' since the types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(148,12): error TS2367: This condition will always return 'false' since the types 'new () => C' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(149,12): error TS2367: This condition will always return 'false' since the types 'new (a?: C) => Base' and 'new (a?: Base) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(150,12): error TS2367: This condition will always return 'false' since the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(154,12): error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(155,12): error TS2367: This condition will always return 'true' since the types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(156,12): error TS2367: This condition will always return 'true' since the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(157,12): error TS2367: This condition will always return 'true' since the types 'new () => Base' and 'new () => C' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(158,12): error TS2367: This condition will always return 'true' since the types 'new (a?: Base) => Base' and 'new (a?: C) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(159,12): error TS2367: This condition will always return 'true' since the types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(162,12): error TS2367: This condition will always return 'true' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(163,12): error TS2367: This condition will always return 'true' since the types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(164,12): error TS2367: This condition will always return 'true' since the types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(165,12): error TS2367: This condition will always return 'true' since the types 'new () => C' and 'new () => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(166,12): error TS2367: This condition will always return 'true' since the types 'new (a?: C) => Base' and 'new (a?: Base) => Base' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(167,12): error TS2367: This condition will always return 'true' since the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(103,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(104,12): error TS2367: Comparison of expressions of types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(105,12): error TS2367: Comparison of expressions of types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(106,12): error TS2367: Comparison of expressions of types 'new () => Base' and 'new () => C' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(107,12): error TS2367: Comparison of expressions of types 'new (a?: Base) => Base' and 'new (a?: C) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(108,12): error TS2367: Comparison of expressions of types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(111,12): error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(112,12): error TS2367: Comparison of expressions of types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(113,12): error TS2367: Comparison of expressions of types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(114,12): error TS2367: Comparison of expressions of types 'new () => C' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(115,12): error TS2367: Comparison of expressions of types 'new (a?: C) => Base' and 'new (a?: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(116,12): error TS2367: Comparison of expressions of types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(120,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(121,12): error TS2367: Comparison of expressions of types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(122,12): error TS2367: Comparison of expressions of types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(123,12): error TS2367: Comparison of expressions of types 'new () => Base' and 'new () => C' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(124,12): error TS2367: Comparison of expressions of types 'new (a?: Base) => Base' and 'new (a?: C) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(125,12): error TS2367: Comparison of expressions of types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(128,12): error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(129,12): error TS2367: Comparison of expressions of types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(130,12): error TS2367: Comparison of expressions of types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(131,12): error TS2367: Comparison of expressions of types 'new () => C' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(132,12): error TS2367: Comparison of expressions of types 'new (a?: C) => Base' and 'new (a?: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(133,12): error TS2367: Comparison of expressions of types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(137,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(138,12): error TS2367: Comparison of expressions of types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(139,12): error TS2367: Comparison of expressions of types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(140,12): error TS2367: Comparison of expressions of types 'new () => Base' and 'new () => C' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(141,12): error TS2367: Comparison of expressions of types 'new (a?: Base) => Base' and 'new (a?: C) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(142,12): error TS2367: Comparison of expressions of types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(145,12): error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(146,12): error TS2367: Comparison of expressions of types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(147,12): error TS2367: Comparison of expressions of types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(148,12): error TS2367: Comparison of expressions of types 'new () => C' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(149,12): error TS2367: Comparison of expressions of types 'new (a?: C) => Base' and 'new (a?: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(150,12): error TS2367: Comparison of expressions of types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(154,12): error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(155,12): error TS2367: Comparison of expressions of types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(156,12): error TS2367: Comparison of expressions of types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(157,12): error TS2367: Comparison of expressions of types 'new () => Base' and 'new () => C' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(158,12): error TS2367: Comparison of expressions of types 'new (a?: Base) => Base' and 'new (a?: C) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(159,12): error TS2367: Comparison of expressions of types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(162,12): error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(163,12): error TS2367: Comparison of expressions of types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(164,12): error TS2367: Comparison of expressions of types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(165,12): error TS2367: Comparison of expressions of types 'new () => C' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(166,12): error TS2367: Comparison of expressions of types 'new (a?: C) => Base' and 'new (a?: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(167,12): error TS2367: Comparison of expressions of types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts (96 errors) ==== @@ -297,163 +297,163 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a2 = a2 == b2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a3 = a3 == b3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a4 = a4 == b4; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new () => Base' and 'new () => C' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and 'new () => C' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a5 = a5 == b5; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a?: Base) => Base' and 'new (a?: C) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a?: Base) => Base' and 'new (a?: C) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a6 = a6 == b6; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a7 = a7 == b7; var r5b1 = b1 == a1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b2 = b2 == a2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b3 = b3 == a3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b4 = b4 == a4; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new () => C' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => C' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b5 = b5 == a5; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a?: C) => Base' and 'new (a?: Base) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a?: C) => Base' and 'new (a?: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b6 = b6 == a6; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b7 = b7 == a7; // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a2 = a2 != b2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a3 = a3 != b3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a4 = a4 != b4; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new () => Base' and 'new () => C' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and 'new () => C' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a5 = a5 != b5; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a?: Base) => Base' and 'new (a?: C) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a?: Base) => Base' and 'new (a?: C) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a6 = a6 != b6; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a7 = a7 != b7; var r6b1 = b1 != a1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b2 = b2 != a2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b3 = b3 != a3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b4 = b4 != a4; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new () => C' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => C' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b5 = b5 != a5; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a?: C) => Base' and 'new (a?: Base) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a?: C) => Base' and 'new (a?: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b6 = b6 != a6; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b7 = b7 != a7; // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a4 = a4 === b4; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new () => Base' and 'new () => C' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and 'new () => C' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a5 = a5 === b5; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a?: Base) => Base' and 'new (a?: C) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a?: Base) => Base' and 'new (a?: C) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a6 = a6 === b6; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a7 = a7 === b7; var r7b1 = b1 === a1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b4 = b4 === a4; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new () => C' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => C' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b5 = b5 === a5; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (a?: C) => Base' and 'new (a?: Base) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a?: C) => Base' and 'new (a?: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b6 = b6 === a6; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b7 = b7 === a7; // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ fn(): Base; }' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ fn(): Base; }' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: number, b: string) => Base' and 'new (a: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a4 = a4 !== b4; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new () => Base' and 'new () => C' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and 'new () => C' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a5 = a5 !== b5; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a?: Base) => Base' and 'new (a?: C) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a?: Base) => Base' and 'new (a?: C) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a6 = a6 !== b6; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a7 = a7 !== b7; var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new () => Base' and '{ fn(): Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => Base' and '{ fn(): Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: string) => Base' and 'new (a: number, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b4 = b4 !== a4; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new () => C' and 'new () => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new () => C' and 'new () => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b5 = b5 !== a5; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (a?: C) => Base' and 'new (a?: Base) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (a?: C) => Base' and 'new (a?: Base) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b6 = b6 !== a6; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. +!!! error TS2367: Comparison of expressions of types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. 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 9daa01a2dde36..75bd40dba823f 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt @@ -22,30 +22,30 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(64,12): error TS2365: Operator '>=' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(65,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(66,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(70,12): error TS2367: This condition will always return 'false' since the types '{ [a: string]: string; }' and '{ [b: string]: number; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(71,12): error TS2367: This condition will always return 'false' since the types '{ [index: string]: Base; }' and '{ [index: string]: C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(72,12): error TS2367: This condition will always return 'false' since the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(75,12): error TS2367: This condition will always return 'false' since the types '{ [b: string]: number; }' and '{ [a: string]: string; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(76,12): error TS2367: This condition will always return 'false' since the types '{ [index: string]: C; }' and '{ [index: string]: Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(77,12): error TS2367: This condition will always return 'false' since the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(81,12): error TS2367: This condition will always return 'true' since the types '{ [a: string]: string; }' and '{ [b: string]: number; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(82,12): error TS2367: This condition will always return 'true' since the types '{ [index: string]: Base; }' and '{ [index: string]: C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(83,12): error TS2367: This condition will always return 'true' since the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(86,12): error TS2367: This condition will always return 'true' since the types '{ [b: string]: number; }' and '{ [a: string]: string; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(87,12): error TS2367: This condition will always return 'true' since the types '{ [index: string]: C; }' and '{ [index: string]: Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(88,12): error TS2367: This condition will always return 'true' since the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(92,12): error TS2367: This condition will always return 'false' since the types '{ [a: string]: string; }' and '{ [b: string]: number; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(93,12): error TS2367: This condition will always return 'false' since the types '{ [index: string]: Base; }' and '{ [index: string]: C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(94,12): error TS2367: This condition will always return 'false' since the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(97,12): error TS2367: This condition will always return 'false' since the types '{ [b: string]: number; }' and '{ [a: string]: string; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(98,12): error TS2367: This condition will always return 'false' since the types '{ [index: string]: C; }' and '{ [index: string]: Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(99,12): error TS2367: This condition will always return 'false' since the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(103,12): error TS2367: This condition will always return 'true' since the types '{ [a: string]: string; }' and '{ [b: string]: number; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(104,12): error TS2367: This condition will always return 'true' since the types '{ [index: string]: Base; }' and '{ [index: string]: C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(105,12): error TS2367: This condition will always return 'true' since the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(108,12): error TS2367: This condition will always return 'true' since the types '{ [b: string]: number; }' and '{ [a: string]: string; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(109,12): error TS2367: This condition will always return 'true' since the types '{ [index: string]: C; }' and '{ [index: string]: Base; }' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(110,12): error TS2367: This condition will always return 'true' since the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(70,12): error TS2367: Comparison of expressions of types '{ [a: string]: string; }' and '{ [b: string]: number; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(71,12): error TS2367: Comparison of expressions of types '{ [index: string]: Base; }' and '{ [index: string]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(72,12): error TS2367: Comparison of expressions of types '{ [index: number]: Base; }' and '{ [index: number]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(75,12): error TS2367: Comparison of expressions of types '{ [b: string]: number; }' and '{ [a: string]: string; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(76,12): error TS2367: Comparison of expressions of types '{ [index: string]: C; }' and '{ [index: string]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(77,12): error TS2367: Comparison of expressions of types '{ [index: number]: C; }' and '{ [index: number]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(81,12): error TS2367: Comparison of expressions of types '{ [a: string]: string; }' and '{ [b: string]: number; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(82,12): error TS2367: Comparison of expressions of types '{ [index: string]: Base; }' and '{ [index: string]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(83,12): error TS2367: Comparison of expressions of types '{ [index: number]: Base; }' and '{ [index: number]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(86,12): error TS2367: Comparison of expressions of types '{ [b: string]: number; }' and '{ [a: string]: string; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(87,12): error TS2367: Comparison of expressions of types '{ [index: string]: C; }' and '{ [index: string]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(88,12): error TS2367: Comparison of expressions of types '{ [index: number]: C; }' and '{ [index: number]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(92,12): error TS2367: Comparison of expressions of types '{ [a: string]: string; }' and '{ [b: string]: number; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(93,12): error TS2367: Comparison of expressions of types '{ [index: string]: Base; }' and '{ [index: string]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(94,12): error TS2367: Comparison of expressions of types '{ [index: number]: Base; }' and '{ [index: number]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(97,12): error TS2367: Comparison of expressions of types '{ [b: string]: number; }' and '{ [a: string]: string; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(98,12): error TS2367: Comparison of expressions of types '{ [index: string]: C; }' and '{ [index: string]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(99,12): error TS2367: Comparison of expressions of types '{ [index: number]: C; }' and '{ [index: number]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(103,12): error TS2367: Comparison of expressions of types '{ [a: string]: string; }' and '{ [b: string]: number; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(104,12): error TS2367: Comparison of expressions of types '{ [index: string]: Base; }' and '{ [index: string]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(105,12): error TS2367: Comparison of expressions of types '{ [index: number]: Base; }' and '{ [index: number]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(108,12): error TS2367: Comparison of expressions of types '{ [b: string]: number; }' and '{ [a: string]: string; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(109,12): error TS2367: Comparison of expressions of types '{ [index: string]: C; }' and '{ [index: string]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(110,12): error TS2367: Comparison of expressions of types '{ [index: number]: C; }' and '{ [index: number]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts (48 errors) ==== @@ -168,91 +168,91 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [a: string]: string; }' and '{ [b: string]: number; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [a: string]: string; }' and '{ [b: string]: number; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a2 = a2 == b2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [index: string]: Base; }' and '{ [index: string]: C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: string]: Base; }' and '{ [index: string]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a3 = a3 == b3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: number]: Base; }' and '{ [index: number]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a4 = a4 == b4; var r5b1 = b1 == a1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [b: string]: number; }' and '{ [a: string]: string; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [b: string]: number; }' and '{ [a: string]: string; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b2 = b2 == a2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [index: string]: C; }' and '{ [index: string]: Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: string]: C; }' and '{ [index: string]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b3 = b3 == a3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: number]: C; }' and '{ [index: number]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b4 = b4 == a4; // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [a: string]: string; }' and '{ [b: string]: number; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [a: string]: string; }' and '{ [b: string]: number; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a2 = a2 != b2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [index: string]: Base; }' and '{ [index: string]: C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: string]: Base; }' and '{ [index: string]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a3 = a3 != b3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: number]: Base; }' and '{ [index: number]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a4 = a4 != b4; var r6b1 = b1 != a1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [b: string]: number; }' and '{ [a: string]: string; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [b: string]: number; }' and '{ [a: string]: string; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b2 = b2 != a2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [index: string]: C; }' and '{ [index: string]: Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: string]: C; }' and '{ [index: string]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b3 = b3 != a3; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: number]: C; }' and '{ [index: number]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b4 = b4 != a4; // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [a: string]: string; }' and '{ [b: string]: number; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [a: string]: string; }' and '{ [b: string]: number; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [index: string]: Base; }' and '{ [index: string]: C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: string]: Base; }' and '{ [index: string]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: number]: Base; }' and '{ [index: number]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a4 = a4 === b4; var r7b1 = b1 === a1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [b: string]: number; }' and '{ [a: string]: string; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [b: string]: number; }' and '{ [a: string]: string; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [index: string]: C; }' and '{ [index: string]: Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: string]: C; }' and '{ [index: string]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: number]: C; }' and '{ [index: number]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b4 = b4 === a4; // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [a: string]: string; }' and '{ [b: string]: number; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [a: string]: string; }' and '{ [b: string]: number; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [index: string]: Base; }' and '{ [index: string]: C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: string]: Base; }' and '{ [index: string]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: number]: Base; }' and '{ [index: number]: C; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a4 = a4 !== b4; var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [b: string]: number; }' and '{ [a: string]: string; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [b: string]: number; }' and '{ [a: string]: string; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [index: string]: C; }' and '{ [index: string]: Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: string]: C; }' and '{ [index: string]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. +!!! error TS2367: Comparison of expressions of types '{ [index: number]: C; }' and '{ [index: number]: Base; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b4 = b4 !== a4; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt index 0e69ec60138b4..800e2460d026d 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt @@ -6,14 +6,14 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso 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 TS2367: This condition will always return 'false' since the types 'A1' and 'B1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(30,11): error TS2367: This condition will always return 'false' since the types 'B1' and 'A1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(33,11): error TS2367: This condition will always return 'true' since the types 'A1' and 'B1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(34,11): error TS2367: This condition will always return 'true' since the types 'B1' and 'A1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(37,11): error TS2367: This condition will always return 'false' since the types 'A1' and 'B1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(38,11): error TS2367: This condition will always return 'false' since the types 'B1' and 'A1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(41,11): error TS2367: This condition will always return 'true' since the types 'A1' and 'B1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(42,11): error TS2367: This condition will always return 'true' since the types 'B1' and 'A1' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(29,11): error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(30,11): error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(33,11): error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(34,11): error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(37,11): error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(38,11): error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(41,11): error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts(42,11): error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts (16 errors) ==== @@ -63,31 +63,31 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator == var re1 = a == b; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'A1' and 'B1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var re2 = b == a; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B1' and 'A1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator != var rf1 = a != b; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'A1' and 'B1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rf2 = b != a; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'B1' and 'A1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator === var rg1 = a === b; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'A1' and 'B1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rg2 = b === a; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B1' and 'A1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator !== var rh1 = a !== b; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'A1' and 'B1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rh2 = b !== a; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'B1' and 'A1' have no overlap. \ No newline at end of file +!!! error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt index 7be28d8c63b1c..dd1a2b4a49d8a 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt @@ -14,22 +14,22 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso 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 TS2367: This condition will always return 'false' since the types 'A1' and 'B1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(52,12): error TS2367: This condition will always return 'false' since the types 'A2' and 'B2' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(54,12): error TS2367: This condition will always return 'false' since the types 'B1' and 'A1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(55,12): error TS2367: This condition will always return 'false' since the types 'B2' and 'A2' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(58,12): error TS2367: This condition will always return 'true' since the types 'A1' and 'B1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(59,12): error TS2367: This condition will always return 'true' since the types 'A2' and 'B2' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(61,12): error TS2367: This condition will always return 'true' since the types 'B1' and 'A1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(62,12): error TS2367: This condition will always return 'true' since the types 'B2' and 'A2' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(65,12): error TS2367: This condition will always return 'false' since the types 'A1' and 'B1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(66,12): error TS2367: This condition will always return 'false' since the types 'A2' and 'B2' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(68,12): error TS2367: This condition will always return 'false' since the types 'B1' and 'A1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(69,12): error TS2367: This condition will always return 'false' since the types 'B2' and 'A2' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(72,12): error TS2367: This condition will always return 'true' since the types 'A1' and 'B1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(73,12): error TS2367: This condition will always return 'true' since the types 'A2' and 'B2' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(75,12): error TS2367: This condition will always return 'true' since the types 'B1' and 'A1' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(76,12): error TS2367: This condition will always return 'true' since the types 'B2' and 'A2' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(51,12): error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(52,12): error TS2367: Comparison of expressions of types 'A2' and 'B2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(54,12): error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(55,12): error TS2367: Comparison of expressions of types 'B2' and 'A2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(58,12): error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(59,12): error TS2367: Comparison of expressions of types 'A2' and 'B2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(61,12): error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(62,12): error TS2367: Comparison of expressions of types 'B2' and 'A2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(65,12): error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(66,12): error TS2367: Comparison of expressions of types 'A2' and 'B2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(68,12): error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(69,12): error TS2367: Comparison of expressions of types 'B2' and 'A2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(72,12): error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(73,12): error TS2367: Comparison of expressions of types 'A2' and 'B2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(75,12): error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts(76,12): error TS2367: Comparison of expressions of types 'B2' and 'A2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts (32 errors) ==== @@ -117,59 +117,59 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'A1' and 'B1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a2 = a2 == b2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'A2' and 'B2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A2' and 'B2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b1 = b1 == a1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B1' and 'A1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b2 = b2 == a2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B2' and 'A2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B2' and 'A2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'A1' and 'B1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a2 = a2 != b2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'A2' and 'B2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A2' and 'B2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b1 = b1 != a1; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'B1' and 'A1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b2 = b2 != a2; ~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'B2' and 'A2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B2' and 'A2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'A1' and 'B1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'A2' and 'B2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A2' and 'B2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b1 = b1 === a1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B1' and 'A1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B2' and 'A2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B2' and 'A2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'A1' and 'B1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A1' and 'B1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'A2' and 'B2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'A2' and 'B2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'B1' and 'A1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B1' and 'A1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'B2' and 'A2' have no overlap. \ No newline at end of file +!!! error TS2367: Comparison of expressions of types 'B2' and 'A2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt index 4b2560e3900fb..8bb3e5fd055f7 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt @@ -70,78 +70,78 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso 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 TS2367: This condition will always return 'false' since the types 'number' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(115,12): error TS2367: This condition will always return 'false' since the types 'number' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(116,12): error TS2367: This condition will always return 'false' since the types 'number' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(119,12): error TS2367: This condition will always return 'false' since the types 'boolean' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(120,12): error TS2367: This condition will always return 'false' since the types 'boolean' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(121,12): error TS2367: This condition will always return 'false' since the types 'boolean' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(122,12): error TS2367: This condition will always return 'false' since the types 'boolean' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(124,12): error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(125,12): error TS2367: This condition will always return 'false' since the types 'string' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(126,12): error TS2367: This condition will always return 'false' since the types 'string' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(127,12): error TS2367: This condition will always return 'false' since the types 'string' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(129,12): error TS2367: This condition will always return 'false' since the types 'void' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(130,12): error TS2367: This condition will always return 'false' since the types 'void' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(131,12): error TS2367: This condition will always return 'false' since the types 'void' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(132,12): error TS2367: This condition will always return 'false' since the types 'void' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(135,12): error TS2367: This condition will always return 'false' since the types 'E' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(136,12): error TS2367: This condition will always return 'false' since the types 'E' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(137,12): error TS2367: This condition will always return 'false' since the types 'E' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(140,12): error TS2367: This condition will always return 'true' since the types 'number' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(141,12): error TS2367: This condition will always return 'true' since the types 'number' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(142,12): error TS2367: This condition will always return 'true' since the types 'number' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(145,12): error TS2367: This condition will always return 'true' since the types 'boolean' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(146,12): error TS2367: This condition will always return 'true' since the types 'boolean' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(147,12): error TS2367: This condition will always return 'true' since the types 'boolean' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(148,12): error TS2367: This condition will always return 'true' since the types 'boolean' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(150,12): error TS2367: This condition will always return 'true' since the types 'string' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(151,12): error TS2367: This condition will always return 'true' since the types 'string' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(152,12): error TS2367: This condition will always return 'true' since the types 'string' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(153,12): error TS2367: This condition will always return 'true' since the types 'string' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(155,12): error TS2367: This condition will always return 'true' since the types 'void' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(156,12): error TS2367: This condition will always return 'true' since the types 'void' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(157,12): error TS2367: This condition will always return 'true' since the types 'void' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(158,12): error TS2367: This condition will always return 'true' since the types 'void' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(161,12): error TS2367: This condition will always return 'true' since the types 'E' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(162,12): error TS2367: This condition will always return 'true' since the types 'E' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(163,12): error TS2367: This condition will always return 'true' since the types 'E' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(166,12): error TS2367: This condition will always return 'false' since the types 'number' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(167,12): error TS2367: This condition will always return 'false' since the types 'number' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(168,12): error TS2367: This condition will always return 'false' since the types 'number' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(171,12): error TS2367: This condition will always return 'false' since the types 'boolean' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(172,12): error TS2367: This condition will always return 'false' since the types 'boolean' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(173,12): error TS2367: This condition will always return 'false' since the types 'boolean' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(174,12): error TS2367: This condition will always return 'false' since the types 'boolean' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(176,12): error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(177,12): error TS2367: This condition will always return 'false' since the types 'string' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(178,12): error TS2367: This condition will always return 'false' since the types 'string' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(179,12): error TS2367: This condition will always return 'false' since the types 'string' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(181,12): error TS2367: This condition will always return 'false' since the types 'void' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(182,12): error TS2367: This condition will always return 'false' since the types 'void' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(183,12): error TS2367: This condition will always return 'false' since the types 'void' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(184,12): error TS2367: This condition will always return 'false' since the types 'void' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(187,12): error TS2367: This condition will always return 'false' since the types 'E' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(188,12): error TS2367: This condition will always return 'false' since the types 'E' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(189,12): error TS2367: This condition will always return 'false' since the types 'E' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(192,12): error TS2367: This condition will always return 'true' since the types 'number' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(193,12): error TS2367: This condition will always return 'true' since the types 'number' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(194,12): error TS2367: This condition will always return 'true' since the types 'number' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(197,12): error TS2367: This condition will always return 'true' since the types 'boolean' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(198,12): error TS2367: This condition will always return 'true' since the types 'boolean' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(199,12): error TS2367: This condition will always return 'true' since the types 'boolean' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(200,12): error TS2367: This condition will always return 'true' since the types 'boolean' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(202,12): error TS2367: This condition will always return 'true' since the types 'string' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(203,12): error TS2367: This condition will always return 'true' since the types 'string' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(204,12): error TS2367: This condition will always return 'true' since the types 'string' and 'void' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(205,12): error TS2367: This condition will always return 'true' since the types 'string' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(207,12): error TS2367: This condition will always return 'true' since the types 'void' and 'number' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(208,12): error TS2367: This condition will always return 'true' since the types 'void' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(209,12): error TS2367: This condition will always return 'true' since the types 'void' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(210,12): error TS2367: This condition will always return 'true' since the types 'void' and 'E' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(213,12): error TS2367: This condition will always return 'true' since the types 'E' and 'boolean' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(214,12): error TS2367: This condition will always return 'true' since the types 'E' and 'string' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(215,12): error TS2367: This condition will always return 'true' since the types 'E' and 'void' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(114,12): error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(115,12): error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(116,12): error TS2367: Comparison of expressions of types 'number' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(119,12): error TS2367: Comparison of expressions of types 'boolean' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(120,12): error TS2367: Comparison of expressions of types 'boolean' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(121,12): error TS2367: Comparison of expressions of types 'boolean' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(122,12): error TS2367: Comparison of expressions of types 'boolean' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(124,12): error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(125,12): error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(126,12): error TS2367: Comparison of expressions of types 'string' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(127,12): error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(129,12): error TS2367: Comparison of expressions of types 'void' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(130,12): error TS2367: Comparison of expressions of types 'void' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(131,12): error TS2367: Comparison of expressions of types 'void' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(132,12): error TS2367: Comparison of expressions of types 'void' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(135,12): error TS2367: Comparison of expressions of types 'E' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(136,12): error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(137,12): error TS2367: Comparison of expressions of types 'E' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(140,12): error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(141,12): error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(142,12): error TS2367: Comparison of expressions of types 'number' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(145,12): error TS2367: Comparison of expressions of types 'boolean' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(146,12): error TS2367: Comparison of expressions of types 'boolean' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(147,12): error TS2367: Comparison of expressions of types 'boolean' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(148,12): error TS2367: Comparison of expressions of types 'boolean' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(150,12): error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(151,12): error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(152,12): error TS2367: Comparison of expressions of types 'string' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(153,12): error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(155,12): error TS2367: Comparison of expressions of types 'void' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(156,12): error TS2367: Comparison of expressions of types 'void' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(157,12): error TS2367: Comparison of expressions of types 'void' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(158,12): error TS2367: Comparison of expressions of types 'void' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(161,12): error TS2367: Comparison of expressions of types 'E' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(162,12): error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(163,12): error TS2367: Comparison of expressions of types 'E' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(166,12): error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(167,12): error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(168,12): error TS2367: Comparison of expressions of types 'number' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(171,12): error TS2367: Comparison of expressions of types 'boolean' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(172,12): error TS2367: Comparison of expressions of types 'boolean' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(173,12): error TS2367: Comparison of expressions of types 'boolean' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(174,12): error TS2367: Comparison of expressions of types 'boolean' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(176,12): error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(177,12): error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(178,12): error TS2367: Comparison of expressions of types 'string' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(179,12): error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(181,12): error TS2367: Comparison of expressions of types 'void' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(182,12): error TS2367: Comparison of expressions of types 'void' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(183,12): error TS2367: Comparison of expressions of types 'void' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(184,12): error TS2367: Comparison of expressions of types 'void' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(187,12): error TS2367: Comparison of expressions of types 'E' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(188,12): error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(189,12): error TS2367: Comparison of expressions of types 'E' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(192,12): error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(193,12): error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(194,12): error TS2367: Comparison of expressions of types 'number' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(197,12): error TS2367: Comparison of expressions of types 'boolean' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(198,12): error TS2367: Comparison of expressions of types 'boolean' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(199,12): error TS2367: Comparison of expressions of types 'boolean' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(200,12): error TS2367: Comparison of expressions of types 'boolean' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(202,12): error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(203,12): error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(204,12): error TS2367: Comparison of expressions of types 'string' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(205,12): error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(207,12): error TS2367: Comparison of expressions of types 'void' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(208,12): error TS2367: Comparison of expressions of types 'void' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(209,12): error TS2367: Comparison of expressions of types 'void' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(210,12): error TS2367: Comparison of expressions of types 'void' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(213,12): error TS2367: Comparison of expressions of types 'E' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(214,12): error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts(215,12): error TS2367: Comparison of expressions of types 'E' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts (144 errors) ==== @@ -404,247 +404,247 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator == var r5a1 = a == b; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'number' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a1 = a == c; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'number' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a1 = a == d; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'number' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5a1 = a == e; // no error, expected var r5b1 = b == a; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'boolean' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b1 = b == c; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'boolean' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b1 = b == d; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'boolean' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5b1 = b == e; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'boolean' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5c1 = c == a; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5c1 = c == b; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5c1 = c == d; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5c1 = c == e; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5d1 = d == a; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'void' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5d1 = d == b; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'void' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5d1 = d == c; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'void' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5d1 = d == e; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'void' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5e1 = e == a; // no error, expected var r5e1 = e == b; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'E' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5e1 = e == c; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'E' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r5e1 = e == d; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'E' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator != var r6a1 = a != b; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'number' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a1 = a != c; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'number' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a1 = a != d; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'number' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6a1 = a != e; // no error, expected var r6b1 = b != a; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b1 = b != c; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b1 = b != d; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6b1 = b != e; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6c1 = c != a; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'string' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6c1 = c != b; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'string' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6c1 = c != d; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'string' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6c1 = c != e; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'string' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6d1 = d != a; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'void' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6d1 = d != b; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'void' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6d1 = d != c; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'void' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6d1 = d != e; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'void' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6e1 = e != a; // no error, expected var r6e1 = e != b; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'E' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6e1 = e != c; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'E' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6e1 = e != d; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'E' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator === var r7a1 = a === b; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'number' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a1 = a === c; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'number' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a1 = a === d; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'number' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7a1 = a === e; // no error, expected var r7b1 = b === a; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'boolean' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b1 = b === c; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'boolean' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b1 = b === d; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'boolean' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7b1 = b === e; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'boolean' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7c1 = c === a; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7c1 = c === b; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7c1 = c === d; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7c1 = c === e; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7d1 = d === a; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'void' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7d1 = d === b; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'void' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7d1 = d === c; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'void' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7d1 = d === e; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'void' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7e1 = e === a; // no error, expected var r7e1 = e === b; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'E' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7e1 = e === c; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'E' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7e1 = e === d; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'E' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator !== var r8a1 = a !== b; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'number' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a1 = a !== c; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'number' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a1 = a !== d; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'number' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8a1 = a !== e; // no error, expected var r8b1 = b !== a; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b1 = b !== c; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b1 = b !== d; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8b1 = b !== e; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'boolean' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8c1 = c !== a; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'string' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8c1 = c !== b; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'string' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8c1 = c !== d; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'string' and 'void' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8c1 = c !== e; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'string' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8d1 = d !== a; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'void' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8d1 = d !== b; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'void' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8d1 = d !== c; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'void' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8d1 = d !== e; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'void' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'void' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8e1 = e !== a; // no error, expected var r8e1 = e !== b; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'E' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8e1 = e !== c; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'E' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8e1 = e !== d; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'E' and 'void' have no overlap. \ No newline at end of file +!!! error TS2367: Comparison of expressions of types 'E' and 'void' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt index da497e03a2206..fd522ddc3e82e 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt @@ -2,10 +2,10 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso 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 TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(17,14): error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(18,14): error TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(19,14): error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(16,14): error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(17,14): error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(18,14): error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(19,14): error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. 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'. @@ -146,16 +146,16 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso !!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'U'. var r5 = t == u; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r6 = t != u; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r7 = t === u; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r8 = t !== u; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // operator < var r1a1 = t < a; diff --git a/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt index 6b07a7e23640d..7e910f0332ba4 100644 --- a/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt @@ -2,34 +2,34 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso 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 TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(11,15): error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(12,15): error TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(13,15): error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(10,15): error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(11,15): error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(12,15): error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(13,15): error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. 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 TS2367: This condition will always return 'false' since the types 'U' and 'T' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(20,15): error TS2367: This condition will always return 'true' since the types 'U' and 'T' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(21,15): error TS2367: This condition will always return 'false' since the types 'U' and 'T' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(22,15): error TS2367: This condition will always return 'true' since the types 'U' and 'T' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(19,15): error TS2367: Comparison of expressions of types 'U' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(20,15): error TS2367: Comparison of expressions of types 'U' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(21,15): error TS2367: Comparison of expressions of types 'U' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(22,15): error TS2367: Comparison of expressions of types 'U' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. 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 TS2367: This condition will always return 'false' since the types 'T' and 'V' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(29,15): error TS2367: This condition will always return 'true' since the types 'T' and 'V' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(30,15): error TS2367: This condition will always return 'false' since the types 'T' and 'V' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(31,15): error TS2367: This condition will always return 'true' since the types 'T' and 'V' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(28,15): error TS2367: Comparison of expressions of types 'T' and 'V' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(29,15): error TS2367: Comparison of expressions of types 'T' and 'V' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(30,15): error TS2367: Comparison of expressions of types 'T' and 'V' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(31,15): error TS2367: Comparison of expressions of types 'T' and 'V' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. 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 TS2367: This condition will always return 'false' since the types 'V' and 'T' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(38,15): error TS2367: This condition will always return 'true' since the types 'V' and 'T' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(39,15): error TS2367: This condition will always return 'false' since the types 'V' and 'T' have no overlap. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(40,15): error TS2367: This condition will always return 'true' since the types 'V' and 'T' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(37,15): error TS2367: Comparison of expressions of types 'V' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(38,15): error TS2367: Comparison of expressions of types 'V' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(39,15): error TS2367: Comparison of expressions of types 'V' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(40,15): error TS2367: Comparison of expressions of types 'V' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts (32 errors) ==== @@ -52,16 +52,16 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso !!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'U'. var ra5 = t == u; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var ra6 = t != u; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var ra7 = t === u; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var ra8 = t !== u; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rb1 = u < t; ~~~~~ @@ -77,16 +77,16 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso !!! error TS2365: Operator '>=' cannot be applied to types 'U' and 'T'. var rb5 = u == t; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'U' and 'T' have no overlap. +!!! error TS2367: Comparison of expressions of types 'U' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rb6 = u != t; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'U' and 'T' have no overlap. +!!! error TS2367: Comparison of expressions of types 'U' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rb7 = u === t; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'U' and 'T' have no overlap. +!!! error TS2367: Comparison of expressions of types 'U' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rb8 = u !== t; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'U' and 'T' have no overlap. +!!! error TS2367: Comparison of expressions of types 'U' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rc1 = t < v; ~~~~~ @@ -102,16 +102,16 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso !!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'V'. var rc5 = t == v; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'T' and 'V' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'V' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rc6 = t != v; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'T' and 'V' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'V' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rc7 = t === v; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'T' and 'V' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'V' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rc8 = t !== v; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'T' and 'V' have no overlap. +!!! error TS2367: Comparison of expressions of types 'T' and 'V' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rd1 = v < t; ~~~~~ @@ -127,16 +127,16 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso !!! error TS2365: Operator '>=' cannot be applied to types 'V' and 'T'. var rd5 = v == t; ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'V' and 'T' have no overlap. +!!! error TS2367: Comparison of expressions of types 'V' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rd6 = v != t; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'V' and 'T' have no overlap. +!!! error TS2367: Comparison of expressions of types 'V' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rd7 = v === t; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'V' and 'T' have no overlap. +!!! error TS2367: Comparison of expressions of types 'V' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var rd8 = v !== t; ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'V' and 'T' have no overlap. +!!! error TS2367: Comparison of expressions of types 'V' and 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // ok var re1 = t < a; diff --git a/tests/baselines/reference/discriminatedUnionTypes1.errors.txt b/tests/baselines/reference/discriminatedUnionTypes1.errors.txt index be5bd96740300..50bc9f056f076 100644 --- a/tests/baselines/reference/discriminatedUnionTypes1.errors.txt +++ b/tests/baselines/reference/discriminatedUnionTypes1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/union/discriminatedUnionTypes1.ts(89,9): error TS2367: This condition will always return 'false' since the types '"A" | "B" | "C" | "D"' and '"X"' have no overlap. +tests/cases/conformance/types/union/discriminatedUnionTypes1.ts(89,9): error TS2367: Comparison of expressions of types '"A" | "B" | "C" | "D"' and '"X"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/types/union/discriminatedUnionTypes1.ts (1 errors) ==== @@ -92,7 +92,7 @@ tests/cases/conformance/types/union/discriminatedUnionTypes1.ts(89,9): error TS2 function f3(m: Message) { if (m.kind === "X") { ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"A" | "B" | "C" | "D"' and '"X"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"A" | "B" | "C" | "D"' and '"X"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. m; // never } } diff --git a/tests/baselines/reference/enumLiteralTypes3.errors.txt b/tests/baselines/reference/enumLiteralTypes3.errors.txt index 8d4007530a8dc..8155ab5f11b48 100644 --- a/tests/baselines/reference/enumLiteralTypes3.errors.txt +++ b/tests/baselines/reference/enumLiteralTypes3.errors.txt @@ -7,9 +7,9 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(19,5): error TS2322: tests/cases/conformance/types/literal/enumLiteralTypes3.ts(37,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(39,5): error TS2322: Type 'Choice.No' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(40,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'YesNo'. -tests/cases/conformance/types/literal/enumLiteralTypes3.ts(52,5): error TS2367: This condition will always return 'false' since the types 'Choice.Yes' and 'Choice.Unknown' have no overlap. -tests/cases/conformance/types/literal/enumLiteralTypes3.ts(54,5): error TS2367: This condition will always return 'false' since the types 'Choice.Yes' and 'Choice.No' have no overlap. -tests/cases/conformance/types/literal/enumLiteralTypes3.ts(55,5): error TS2367: This condition will always return 'false' since the types 'YesNo' and 'Choice.Unknown' have no overlap. +tests/cases/conformance/types/literal/enumLiteralTypes3.ts(52,5): error TS2367: Comparison of expressions of types 'Choice.Yes' and 'Choice.Unknown' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/enumLiteralTypes3.ts(54,5): error TS2367: Comparison of expressions of types 'Choice.Yes' and 'Choice.No' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/enumLiteralTypes3.ts(55,5): error TS2367: Comparison of expressions of types 'YesNo' and 'Choice.Unknown' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(87,14): error TS2678: Type 'Choice.Unknown' is not comparable to type 'Choice.Yes'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(89,14): error TS2678: Type 'Choice.No' is not comparable to type 'Choice.Yes'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(96,14): error TS2678: Type 'Choice.Unknown' is not comparable to type 'YesNo'. @@ -86,14 +86,14 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(96,14): error TS2678: function f6(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { a === Choice.Unknown; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'Choice.Yes' and 'Choice.Unknown' have no overlap. +!!! error TS2367: Comparison of expressions of types 'Choice.Yes' and 'Choice.Unknown' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. a === Choice.Yes; a === Choice.No; ~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'Choice.Yes' and 'Choice.No' have no overlap. +!!! error TS2367: Comparison of expressions of types 'Choice.Yes' and 'Choice.No' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b === Choice.Unknown; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'YesNo' and 'Choice.Unknown' have no overlap. +!!! error TS2367: Comparison of expressions of types 'YesNo' and 'Choice.Unknown' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b === Choice.Yes; b === Choice.No; c === Choice.Unknown; diff --git a/tests/baselines/reference/equalityWithIntersectionTypes01.errors.txt b/tests/baselines/reference/equalityWithIntersectionTypes01.errors.txt index d9cbc5c767d09..517259e2c9270 100644 --- a/tests/baselines/reference/equalityWithIntersectionTypes01.errors.txt +++ b/tests/baselines/reference/equalityWithIntersectionTypes01.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(17,5): error TS2367: This condition will always return 'false' since the types 'I1 & I3' and 'I2' have no overlap. -tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(17,16): error TS2367: This condition will always return 'false' since the types 'I2' and 'I1 & I3' have no overlap. -tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(19,10): error TS2367: This condition will always return 'true' since the types 'I1 & I3' and 'I2' have no overlap. -tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(19,21): error TS2367: This condition will always return 'true' since the types 'I2' and 'I1 & I3' have no overlap. -tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(21,10): error TS2367: This condition will always return 'false' since the types 'I1 & I3' and 'I2' have no overlap. -tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(21,20): error TS2367: This condition will always return 'false' since the types 'I2' and 'I1 & I3' have no overlap. -tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(23,10): error TS2367: This condition will always return 'true' since the types 'I1 & I3' and 'I2' have no overlap. -tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(23,20): error TS2367: This condition will always return 'true' since the types 'I2' and 'I1 & I3' have no overlap. +tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(17,5): error TS2367: Comparison of expressions of types 'I1 & I3' and 'I2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(17,16): error TS2367: Comparison of expressions of types 'I2' and 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(19,10): error TS2367: Comparison of expressions of types 'I1 & I3' and 'I2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(19,21): error TS2367: Comparison of expressions of types 'I2' and 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(21,10): error TS2367: Comparison of expressions of types 'I1 & I3' and 'I2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(21,20): error TS2367: Comparison of expressions of types 'I2' and 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(23,10): error TS2367: Comparison of expressions of types 'I1 & I3' and 'I2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts(23,20): error TS2367: Comparison of expressions of types 'I2' and 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts (8 errors) ==== @@ -27,25 +27,25 @@ tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersect if (y === z || z === y) { ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'I1 & I3' and 'I2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'I1 & I3' and 'I2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'I2' and 'I1 & I3' have no overlap. +!!! error TS2367: Comparison of expressions of types 'I2' and 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. } else if (y !== z || z !== y) { ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'I1 & I3' and 'I2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'I1 & I3' and 'I2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'I2' and 'I1 & I3' have no overlap. +!!! error TS2367: Comparison of expressions of types 'I2' and 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. } else if (y == z || z == y) { ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'I1 & I3' and 'I2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'I1 & I3' and 'I2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'I2' and 'I1 & I3' have no overlap. +!!! error TS2367: Comparison of expressions of types 'I2' and 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. } else if (y != z || z != y) { ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'I1 & I3' and 'I2' have no overlap. +!!! error TS2367: Comparison of expressions of types 'I1 & I3' and 'I2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'I2' and 'I1 & I3' have no overlap. +!!! error TS2367: Comparison of expressions of types 'I2' and 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. } \ No newline at end of file diff --git a/tests/baselines/reference/expr.errors.txt b/tests/baselines/reference/expr.errors.txt index 5acfd691d586e..aa05860334107 100644 --- a/tests/baselines/reference/expr.errors.txt +++ b/tests/baselines/reference/expr.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/expr.ts(87,5): error TS2367: This condition will always return 'false' since the types 'number' and 'string' have no overlap. -tests/cases/compiler/expr.ts(88,5): error TS2367: This condition will always return 'false' since the types 'number' and 'boolean' have no overlap. -tests/cases/compiler/expr.ts(94,5): error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. -tests/cases/compiler/expr.ts(95,5): error TS2367: This condition will always return 'false' since the types 'string' and 'boolean' have no overlap. -tests/cases/compiler/expr.ts(98,5): error TS2367: This condition will always return 'false' since the types 'string' and 'E' have no overlap. -tests/cases/compiler/expr.ts(115,5): error TS2367: This condition will always return 'false' since the types 'E' and 'string' have no overlap. -tests/cases/compiler/expr.ts(116,5): error TS2367: This condition will always return 'false' since the types 'E' and 'false' have no overlap. +tests/cases/compiler/expr.ts(87,5): error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/expr.ts(88,5): error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/expr.ts(94,5): error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/expr.ts(95,5): error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/expr.ts(98,5): error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/expr.ts(115,5): error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/expr.ts(116,5): error TS2367: Comparison of expressions of types 'E' and 'false' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/compiler/expr.ts(142,5): error TS2365: Operator '+' cannot be applied to types 'number' and 'false'. 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'. @@ -158,10 +158,10 @@ tests/cases/compiler/expr.ts(242,7): error TS2363: The right-hand side of an ari n==a; n==s; ~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'number' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. n==b; ~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'number' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. n==i; n==n; n==e; @@ -169,15 +169,15 @@ tests/cases/compiler/expr.ts(242,7): error TS2363: The right-hand side of an ari s==a; s==n; ~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. s==b; ~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. s==i; s==s; s==e; ~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'E' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'E' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. a==n; a==s; @@ -196,10 +196,10 @@ tests/cases/compiler/expr.ts(242,7): error TS2363: The right-hand side of an ari e==n; e==s; ~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'E' and 'string' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. e==b; ~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'E' and 'false' have no overlap. +!!! error TS2367: Comparison of expressions of types 'E' and 'false' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. e==a; e==i; e==e; diff --git a/tests/baselines/reference/for-inStatementsArrayErrors.errors.txt b/tests/baselines/reference/for-inStatementsArrayErrors.errors.txt index 568412b563b66..ba3a0a62dc5d0 100644 --- a/tests/baselines/reference/for-inStatementsArrayErrors.errors.txt +++ b/tests/baselines/reference/for-inStatementsArrayErrors.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(4,16): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'. tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(5,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(6,9): error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. +tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(6,9): error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(8,16): error TS2339: Property 'unknownProperty' does not exist on type 'string'. tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(12,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'string'. tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(16,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'j' must be of type 'any', but here has type 'string'. @@ -18,7 +18,7 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors. !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. if (x === 1) { ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. } let a3 = x.unknownProperty; ~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt b/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt index af21b4c12bd99..fd98cf12138b4 100644 --- a/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt +++ b/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/infinitelyExpandingTypes1.ts(21,1): error TS2367: This condition will always return 'false' since the types 'List' and 'List' have no overlap. +tests/cases/compiler/infinitelyExpandingTypes1.ts(21,1): error TS2367: Comparison of expressions of types 'List' and 'List' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/infinitelyExpandingTypes1.ts (1 errors) ==== @@ -24,6 +24,6 @@ tests/cases/compiler/infinitelyExpandingTypes1.ts(21,1): error TS2367: This cond l == l2; // should error; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'List' and 'List' have no overlap. +!!! error TS2367: Comparison of expressions of types 'List' and 'List' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. l == l; // should not error \ No newline at end of file diff --git a/tests/baselines/reference/numberVsBigIntOperations.errors.txt b/tests/baselines/reference/numberVsBigIntOperations.errors.txt index fbd49ddd091e1..be4e5ae60fc90 100644 --- a/tests/baselines/reference/numberVsBigIntOperations.errors.txt +++ b/tests/baselines/reference/numberVsBigIntOperations.errors.txt @@ -47,10 +47,10 @@ tests/cases/compiler/numberVsBigIntOperations.ts(25,43): error TS2365: Operator tests/cases/compiler/numberVsBigIntOperations.ts(38,1): error TS2365: Operator '>>>=' cannot be applied to types 'bigint' and '1n'. tests/cases/compiler/numberVsBigIntOperations.ts(39,10): error TS2365: Operator '>>>' cannot be applied to types 'bigint' and '1n'. tests/cases/compiler/numberVsBigIntOperations.ts(40,8): error TS2736: Operator '+' cannot be applied to type 'bigint'. -tests/cases/compiler/numberVsBigIntOperations.ts(50,10): error TS2367: This condition will always return 'false' since the types 'bigint' and 'number' have no overlap. -tests/cases/compiler/numberVsBigIntOperations.ts(51,10): error TS2367: This condition will always return 'true' since the types 'bigint' and 'number' have no overlap. -tests/cases/compiler/numberVsBigIntOperations.ts(52,10): error TS2367: This condition will always return 'false' since the types 'bigint' and 'number' have no overlap. -tests/cases/compiler/numberVsBigIntOperations.ts(53,10): error TS2367: This condition will always return 'true' since the types 'bigint' and 'number' have no overlap. +tests/cases/compiler/numberVsBigIntOperations.ts(50,10): error TS2367: Comparison of expressions of types 'bigint' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/numberVsBigIntOperations.ts(51,10): error TS2367: Comparison of expressions of types 'bigint' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/numberVsBigIntOperations.ts(52,10): error TS2367: Comparison of expressions of types 'bigint' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/compiler/numberVsBigIntOperations.ts(53,10): error TS2367: Comparison of expressions of types 'bigint' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/compiler/numberVsBigIntOperations.ts(56,7): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/compiler/numberVsBigIntOperations.ts(56,27): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/compiler/numberVsBigIntOperations.ts(57,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -214,16 +214,16 @@ tests/cases/compiler/numberVsBigIntOperations.ts(93,7): error TS1155: 'const' de // Trying to compare for equality is likely an error (since 1 == "1" is disallowed) result = bigInt == num; ~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'bigint' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'bigint' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. result = bigInt != num; ~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'bigint' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'bigint' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. result = bigInt === num; ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'bigint' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'bigint' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. result = bigInt !== num; ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'bigint' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'bigint' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. // Types of arithmetic operations on other types num = "3" & 5; num = 2 ** false; // should error, but infer number diff --git a/tests/baselines/reference/numericLiteralTypes3.errors.txt b/tests/baselines/reference/numericLiteralTypes3.errors.txt index a9fbb5df915a0..b9a1f82e36363 100644 --- a/tests/baselines/reference/numericLiteralTypes3.errors.txt +++ b/tests/baselines/reference/numericLiteralTypes3.errors.txt @@ -22,15 +22,15 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(39,5): error TS232 tests/cases/conformance/types/literal/numericLiteralTypes3.ts(40,5): error TS2322: Type '1' is not assignable to type 'B'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(43,5): error TS2322: Type '0' is not assignable to type 'C'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(50,5): error TS2322: Type '3' is not assignable to type 'D'. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(54,5): error TS2367: This condition will always return 'false' since the types '1' and '0' have no overlap. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(56,5): error TS2367: This condition will always return 'false' since the types '1' and '2' have no overlap. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(57,5): error TS2367: This condition will always return 'false' since the types '1' and '3' have no overlap. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(58,5): error TS2367: This condition will always return 'false' since the types 'B' and '0' have no overlap. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(59,5): error TS2367: This condition will always return 'false' since the types 'B' and '1' have no overlap. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(62,5): error TS2367: This condition will always return 'false' since the types 'C' and '0' have no overlap. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(69,5): error TS2367: This condition will always return 'false' since the types 'D' and '3' have no overlap. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(74,5): error TS2367: This condition will always return 'false' since the types '1' and 'B' have no overlap. -tests/cases/conformance/types/literal/numericLiteralTypes3.ts(77,5): error TS2367: This condition will always return 'false' since the types 'B' and '1' have no overlap. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(54,5): error TS2367: Comparison of expressions of types '1' and '0' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(56,5): error TS2367: Comparison of expressions of types '1' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(57,5): error TS2367: Comparison of expressions of types '1' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(58,5): error TS2367: Comparison of expressions of types 'B' and '0' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(59,5): error TS2367: Comparison of expressions of types 'B' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(62,5): error TS2367: Comparison of expressions of types 'C' and '0' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(69,5): error TS2367: Comparison of expressions of types 'D' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(74,5): error TS2367: Comparison of expressions of types '1' and 'B' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/numericLiteralTypes3.ts(77,5): error TS2367: Comparison of expressions of types 'B' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(94,14): error TS2678: Type '1' is not comparable to type '0 | 2 | 4'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(96,14): error TS2678: Type '3' is not comparable to type '0 | 2 | 4'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS2678: Type '5' is not comparable to type '0 | 2 | 4'. @@ -132,25 +132,25 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 function f6(a: A, b: B, c: C, d: D) { a === 0; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '1' and '0' have no overlap. +!!! error TS2367: Comparison of expressions of types '1' and '0' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. a === 1; a === 2; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '1' and '2' have no overlap. +!!! error TS2367: Comparison of expressions of types '1' and '2' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. a === 3; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '1' and '3' have no overlap. +!!! error TS2367: Comparison of expressions of types '1' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b === 0; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B' and '0' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B' and '0' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b === 1; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b === 2; b === 3; c === 0; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'C' and '0' have no overlap. +!!! error TS2367: Comparison of expressions of types 'C' and '0' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. c === 1; c === 2; c === 3; @@ -159,19 +159,19 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 d === 2; d === 3; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'D' and '3' have no overlap. +!!! error TS2367: Comparison of expressions of types 'D' and '3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. } function f7(a: A, b: B, c: C, d: D) { a === a; a === b; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '1' and 'B' have no overlap. +!!! error TS2367: Comparison of expressions of types '1' and 'B' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. a === c; a === d; b === a; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'B' and '1' have no overlap. +!!! error TS2367: Comparison of expressions of types 'B' and '1' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b === b; b === c; b === d; diff --git a/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt b/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt index 5c4fb98067678..22642f4e3b814 100644 --- a/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt +++ b/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt @@ -7,9 +7,9 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(19,5): error TS tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(37,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(39,5): error TS2322: Type 'Choice.No' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(40,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'YesNo'. -tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(52,5): error TS2367: This condition will always return 'false' since the types 'Choice.Yes' and 'Choice.Unknown' have no overlap. -tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(54,5): error TS2367: This condition will always return 'false' since the types 'Choice.Yes' and 'Choice.No' have no overlap. -tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(55,5): error TS2367: This condition will always return 'false' since the types 'YesNo' and 'Choice.Unknown' have no overlap. +tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(52,5): error TS2367: Comparison of expressions of types 'Choice.Yes' and 'Choice.Unknown' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(54,5): error TS2367: Comparison of expressions of types 'Choice.Yes' and 'Choice.No' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(55,5): error TS2367: Comparison of expressions of types 'YesNo' and 'Choice.Unknown' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(87,14): error TS2678: Type 'Choice.Unknown' is not comparable to type 'Choice.Yes'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(89,14): error TS2678: Type 'Choice.No' is not comparable to type 'Choice.Yes'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(96,14): error TS2678: Type 'Choice.Unknown' is not comparable to type 'YesNo'. @@ -86,14 +86,14 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(96,14): error T function f6(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { a === Choice.Unknown; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'Choice.Yes' and 'Choice.Unknown' have no overlap. +!!! error TS2367: Comparison of expressions of types 'Choice.Yes' and 'Choice.Unknown' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. a === Choice.Yes; a === Choice.No; ~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'Choice.Yes' and 'Choice.No' have no overlap. +!!! error TS2367: Comparison of expressions of types 'Choice.Yes' and 'Choice.No' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b === Choice.Unknown; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'YesNo' and 'Choice.Unknown' have no overlap. +!!! error TS2367: Comparison of expressions of types 'YesNo' and 'Choice.Unknown' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b === Choice.Yes; b === Choice.No; c === Choice.Unknown; diff --git a/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.errors.txt b/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.errors.txt index e159a026cf179..af65749cb9459 100644 --- a/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesWithVariousOperators02.errors.txt @@ -7,8 +7,8 @@ tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperato tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(12,11): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(13,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(14,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(16,9): error TS2367: This condition will always return 'false' since the types '"ABC"' and '"XYZ"' have no overlap. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(17,9): error TS2367: This condition will always return 'true' since the types '"ABC"' and '"XYZ"' have no overlap. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(16,9): error TS2367: Comparison of expressions of types '"ABC"' and '"XYZ"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts(17,9): error TS2367: Comparison of expressions of types '"ABC"' and '"XYZ"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts (11 errors) ==== @@ -47,7 +47,7 @@ tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperato let j = abc < xyz; let k = abc === xyz; ~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"ABC"' and '"XYZ"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"ABC"' and '"XYZ"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. let l = abc != xyz; ~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"ABC"' and '"XYZ"' have no overlap. \ No newline at end of file +!!! error TS2367: Comparison of expressions of types '"ABC"' and '"XYZ"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralsAssertionsInEqualityComparisons02.errors.txt b/tests/baselines/reference/stringLiteralsAssertionsInEqualityComparisons02.errors.txt index 8cb9e8203e7ad..39e9b9eb18bf5 100644 --- a/tests/baselines/reference/stringLiteralsAssertionsInEqualityComparisons02.errors.txt +++ b/tests/baselines/reference/stringLiteralsAssertionsInEqualityComparisons02.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/literal/stringLiteralsAssertionsInEqualityComparisons02.ts(3,9): error TS2367: This condition will always return 'false' since the types '"foo"' and '"baz"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsAssertionsInEqualityComparisons02.ts(5,9): error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. +tests/cases/conformance/types/literal/stringLiteralsAssertionsInEqualityComparisons02.ts(3,9): error TS2367: Comparison of expressions of types '"foo"' and '"baz"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsAssertionsInEqualityComparisons02.ts(5,9): error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/conformance/types/literal/stringLiteralsAssertionsInEqualityComparisons02.ts(5,19): error TS2352: Conversion of type 'string' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. @@ -8,11 +8,11 @@ tests/cases/conformance/types/literal/stringLiteralsAssertionsInEqualityComparis var a = "foo" === "bar" as "baz"; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"foo"' and '"baz"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"baz"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var b = "foo" !== ("bar" as "foo"); var c = "foo" == ("bar"); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'string' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ~~~~~~~~~~~~~ !!! error TS2352: Conversion of type 'string' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. var d = "foo" === ("bar" as EnhancedString); \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralsWithEqualityChecks01.errors.txt b/tests/baselines/reference/stringLiteralsWithEqualityChecks01.errors.txt index bd0bc1d3ebb8c..fd5b4287f65cb 100644 --- a/tests/baselines/reference/stringLiteralsWithEqualityChecks01.errors.txt +++ b/tests/baselines/reference/stringLiteralsWithEqualityChecks01.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(8,5): error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(9,5): error TS2367: This condition will always return 'false' since the types '"bar"' and '"foo"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(10,5): error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(17,5): error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(18,5): error TS2367: This condition will always return 'true' since the types '"bar"' and '"foo"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(19,5): error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(8,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(9,5): error TS2367: Comparison of expressions of types '"bar"' and '"foo"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(10,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(17,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(18,5): error TS2367: Comparison of expressions of types '"bar"' and '"foo"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(19,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts (6 errors) ==== @@ -16,13 +16,13 @@ tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(19,5 b = y === "foo"; b = "foo" === "bar"; ~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = "bar" === x; ~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"bar"' and '"foo"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"bar"' and '"foo"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = x === "bar"; ~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = y === "bar"; b = "bar" === y; @@ -31,13 +31,13 @@ tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts(19,5 b = y !== "foo"; b = "foo" !== "bar"; ~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = "bar" !== x; ~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"bar"' and '"foo"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"bar"' and '"foo"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = x !== "bar"; ~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = y !== "bar"; b = "bar" !== y; diff --git a/tests/baselines/reference/stringLiteralsWithEqualityChecks02.errors.txt b/tests/baselines/reference/stringLiteralsWithEqualityChecks02.errors.txt index 5091d3cf7750e..a2d83ffec1661 100644 --- a/tests/baselines/reference/stringLiteralsWithEqualityChecks02.errors.txt +++ b/tests/baselines/reference/stringLiteralsWithEqualityChecks02.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(8,5): error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(9,5): error TS2367: This condition will always return 'false' since the types '"bar"' and '"foo"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(10,5): error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(17,5): error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(18,5): error TS2367: This condition will always return 'true' since the types '"bar"' and '"foo"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(19,5): error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(8,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(9,5): error TS2367: Comparison of expressions of types '"bar"' and '"foo"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(10,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(17,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(18,5): error TS2367: Comparison of expressions of types '"bar"' and '"foo"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(19,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts (6 errors) ==== @@ -16,13 +16,13 @@ tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(19,5 b = y == "foo"; b = "foo" == "bar"; ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = "bar" == x; ~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"bar"' and '"foo"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"bar"' and '"foo"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = x == "bar"; ~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = y == "bar"; b = "bar" == y; @@ -31,13 +31,13 @@ tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts(19,5 b = y != "foo"; b = "foo" != "bar"; ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = "bar" != x; ~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"bar"' and '"foo"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"bar"' and '"foo"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = x != "bar"; ~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = y != "bar"; b = "bar" != y; diff --git a/tests/baselines/reference/stringLiteralsWithEqualityChecks03.errors.txt b/tests/baselines/reference/stringLiteralsWithEqualityChecks03.errors.txt index cb25251645025..f854bcfc1627b 100644 --- a/tests/baselines/reference/stringLiteralsWithEqualityChecks03.errors.txt +++ b/tests/baselines/reference/stringLiteralsWithEqualityChecks03.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks03.ts(16,5): error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks03.ts(25,5): error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks03.ts(16,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks03.ts(25,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks03.ts (2 errors) ==== @@ -20,7 +20,7 @@ tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks03.ts(25,5 b = y === "foo"; b = "foo" === "bar"; ~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = "bar" === x; b = x === "bar"; b = y === "bar"; @@ -31,7 +31,7 @@ tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks03.ts(25,5 b = y !== "foo"; b = "foo" !== "bar"; ~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = "bar" !== x; b = x !== "bar"; b = y !== "bar"; diff --git a/tests/baselines/reference/stringLiteralsWithEqualityChecks04.errors.txt b/tests/baselines/reference/stringLiteralsWithEqualityChecks04.errors.txt index 8bdee5e16173c..5c1d9bb686dc3 100644 --- a/tests/baselines/reference/stringLiteralsWithEqualityChecks04.errors.txt +++ b/tests/baselines/reference/stringLiteralsWithEqualityChecks04.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks04.ts(16,5): error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks04.ts(25,5): error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks04.ts(16,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks04.ts(25,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks04.ts (2 errors) ==== @@ -20,7 +20,7 @@ tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks04.ts(25,5 b = y == "foo"; b = "foo" == "bar"; ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = "bar" == x; b = x == "bar"; b = y == "bar"; @@ -31,7 +31,7 @@ tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks04.ts(25,5 b = y != "foo"; b = "foo" != "bar"; ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = "bar" != x; b = x != "bar"; b = y != "bar"; diff --git a/tests/baselines/reference/stringLiteralsWithSwitchStatements02.errors.txt b/tests/baselines/reference/stringLiteralsWithSwitchStatements02.errors.txt index b410857a2b5bd..543fbe4f37237 100644 --- a/tests/baselines/reference/stringLiteralsWithSwitchStatements02.errors.txt +++ b/tests/baselines/reference/stringLiteralsWithSwitchStatements02.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements02.ts(8,5): error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. -tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements02.ts(13,5): error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements02.ts(8,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements02.ts(13,5): error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements02.ts (2 errors) ==== @@ -12,13 +12,13 @@ tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements02.ts(13 b = y == "foo"; b = "foo" == "bar"; ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. b = x != y; b = "foo" != y b = y != "foo"; b = "foo" != "bar"; ~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"foo"' and '"bar"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"foo"' and '"bar"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. \ No newline at end of file diff --git a/tests/baselines/reference/symbolType9.errors.txt b/tests/baselines/reference/symbolType9.errors.txt index 5b6c233367ef2..0ea4c7fd55243 100644 --- a/tests/baselines/reference/symbolType9.errors.txt +++ b/tests/baselines/reference/symbolType9.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/Symbols/symbolType9.ts(3,1): error TS2367: This condition will always return 'false' since the types 'symbol' and 'boolean' have no overlap. -tests/cases/conformance/es6/Symbols/symbolType9.ts(5,1): error TS2367: This condition will always return 'true' since the types 'number' and 'symbol' have no overlap. -tests/cases/conformance/es6/Symbols/symbolType9.ts(7,1): error TS2367: This condition will always return 'false' since the types 'symbol' and 'number' have no overlap. -tests/cases/conformance/es6/Symbols/symbolType9.ts(9,1): error TS2367: This condition will always return 'true' since the types 'boolean' and 'symbol' have no overlap. +tests/cases/conformance/es6/Symbols/symbolType9.ts(3,1): error TS2367: Comparison of expressions of types 'symbol' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/es6/Symbols/symbolType9.ts(5,1): error TS2367: Comparison of expressions of types 'number' and 'symbol' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/es6/Symbols/symbolType9.ts(7,1): error TS2367: Comparison of expressions of types 'symbol' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/es6/Symbols/symbolType9.ts(9,1): error TS2367: Comparison of expressions of types 'boolean' and 'symbol' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/es6/Symbols/symbolType9.ts (4 errors) ==== @@ -9,16 +9,16 @@ tests/cases/conformance/es6/Symbols/symbolType9.ts(9,1): error TS2367: This cond s == s; s == true; ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'symbol' and 'boolean' have no overlap. +!!! error TS2367: Comparison of expressions of types 'symbol' and 'boolean' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. s != s; 0 != s; ~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'number' and 'symbol' have no overlap. +!!! error TS2367: Comparison of expressions of types 'number' and 'symbol' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. s === s; s === 1; ~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'symbol' and 'number' have no overlap. +!!! error TS2367: Comparison of expressions of types 'symbol' and 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. s !== s; false !== s; ~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types 'boolean' and 'symbol' have no overlap. \ No newline at end of file +!!! error TS2367: Comparison of expressions of types 'boolean' and 'symbol' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. \ No newline at end of file diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt index e10cf2d1a78f5..b717d83fe5fd9 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(13,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r1' must be of type 'string', but here has type 'number'. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(20,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r2' must be of type 'boolean', but here has type 'string'. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(27,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r3' must be of type 'number', but here has type 'boolean'. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(30,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(30,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(34,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'C', but here has type 'string'. @@ -43,7 +43,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHa if (typeof strOrC == "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r4 = strOrC; // string | C } else { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt index a0e9cd0f7bf00..e6c7e7ac1ade2 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(13,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r1' must be of type 'number', but here has type 'string'. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(20,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r2' must be of type 'string', but here has type 'boolean'. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(27,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r3' must be of type 'boolean', but here has type 'number'. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(30,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(30,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(34,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'string', but here has type 'C'. @@ -43,7 +43,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasN if (typeof strOrC != "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r4 = strOrC; // string | C } else { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt index d310abe9cd244..8bc14ea050358 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(21,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(27,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(33,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(21,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(27,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(33,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(40,5): error TS2322: Type 'string | C' is not assignable to type 'C'. Type 'string' is not assignable to type 'C'. tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(43,9): error TS2322: Type 'string | C' is not assignable to type 'string'. Type 'C' is not assignable to type 'string'. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(46,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(56,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(62,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(68,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. -tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(46,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(56,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(62,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(68,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. +tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,5): error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts (10 errors) ==== @@ -35,7 +35,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, if (typeof strOrC === "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. c = strOrC; // C } else { @@ -43,7 +43,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, } if (typeof numOrC === "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. c = numOrC; // C } else { @@ -51,7 +51,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, } if (typeof boolOrC === "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. c = boolOrC; // C } else { @@ -72,7 +72,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, if (typeof strOrNumOrBool === "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. let q1: {} = strOrNumOrBool; // {} } else { @@ -84,7 +84,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, // - when false, narrows the type of x by typeof x === s when true. if (typeof strOrC !== "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r2: string = strOrC; // string } else { @@ -92,7 +92,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, } if (typeof numOrC !== "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r3: number = numOrC; // number } else { @@ -100,7 +100,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, } if (typeof boolOrC !== "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. var r4: boolean = boolOrC; // boolean } else { @@ -109,7 +109,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, if (typeof strOrNumOrBool !== "Object") { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap. +!!! error TS2367: Comparison of expressions of types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. let q1: string | number | boolean = strOrNumOrBool; // string | number | boolean } else { diff --git a/tests/baselines/reference/typeMatch1.errors.txt b/tests/baselines/reference/typeMatch1.errors.txt index 7e471171a0e86..1062fbae99923 100644 --- a/tests/baselines/reference/typeMatch1.errors.txt +++ b/tests/baselines/reference/typeMatch1.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/typeMatch1.ts(18,1): error TS2322: Type 'D' is not assignable to type 'C'. Types have separate declarations of a private property 'x'. tests/cases/compiler/typeMatch1.ts(19,4): error TS2741: Property 'x' is missing in type 'typeof C' but required in type 'C'. -tests/cases/compiler/typeMatch1.ts(20,1): error TS2367: This condition will always return 'false' since the types 'typeof C' and 'typeof D' have no overlap. +tests/cases/compiler/typeMatch1.ts(20,1): error TS2367: Comparison of expressions of types 'typeof C' and 'typeof D' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. ==== tests/cases/compiler/typeMatch1.ts (3 errors) ==== @@ -33,7 +33,7 @@ tests/cases/compiler/typeMatch1.ts(20,1): error TS2367: This condition will alwa !!! related TS6213 tests/cases/compiler/typeMatch1.ts:19:4: Did you mean to use 'new' with this expression? C==D; ~~~~ -!!! error TS2367: This condition will always return 'false' since the types 'typeof C' and 'typeof D' have no overlap. +!!! error TS2367: Comparison of expressions of types 'typeof C' and 'typeof D' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert one of the expressions to 'unknown' first. C==C; \ No newline at end of file