From b7e9ddf2785739badf3408905eb4cc68fefe6537 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 20 Jan 2023 13:47:50 -0800 Subject: [PATCH 1/5] Remove suspicious relational operator carve-out to see what happens --- src/compiler/checker.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 21517d1bee56a..ce91099c2da3f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -36342,8 +36342,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const leftAssignableToNumber = isTypeAssignableTo(left, numberOrBigIntType); const rightAssignableToNumber = isTypeAssignableTo(right, numberOrBigIntType); - return leftAssignableToNumber && rightAssignableToNumber || - !leftAssignableToNumber && !rightAssignableToNumber && areTypesComparable(left, right); + return leftAssignableToNumber && rightAssignableToNumber; }); } return booleanType; From bf7829f211caedc638a1040254e3fceba303dad4 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 20 Jan 2023 13:58:34 -0800 Subject: [PATCH 2/5] Also strings... --- src/compiler/checker.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ce91099c2da3f..4132f9e4e48ce 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -36342,7 +36342,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const leftAssignableToNumber = isTypeAssignableTo(left, numberOrBigIntType); const rightAssignableToNumber = isTypeAssignableTo(right, numberOrBigIntType); - return leftAssignableToNumber && rightAssignableToNumber; + if (leftAssignableToNumber && rightAssignableToNumber) return true; + const leftAssignableToString = isTypeAssignableTo(left, stringType); + const rightAssignableToString = isTypeAssignableTo(right, stringType); + return leftAssignableToString && rightAssignableToString; }); } return booleanType; From 5f7d2d92a5bc0827a76a093d3fc0a45498acc049 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 20 Jan 2023 14:03:39 -0800 Subject: [PATCH 3/5] Baseline update --- ...sonOperatorWithIdenticalObjects.errors.txt | 365 ++++++++++++ ...ratorWithIdenticalPrimitiveType.errors.txt | 26 +- ...ratorWithIdenticalTypeParameter.errors.txt | 25 + ...ationshipObjectsOnCallSignature.errors.txt | 26 +- ...ipObjectsOnConstructorSignature.errors.txt | 26 +- ...tionshipObjectsOnIndexSignature.errors.txt | 26 +- ...ectsOnInstantiatedCallSignature.errors.txt | 296 ++++++++++ ...nstantiatedConstructorSignature.errors.txt | 296 ++++++++++ ...WithNoRelationshipTypeParameter.errors.txt | 242 +++++++- ...ithSubtypeObjectOnCallSignature.errors.txt | 526 ++++++++++++++++++ ...ypeObjectOnConstructorSignature.errors.txt | 440 +++++++++++++++ ...thSubtypeObjectOnIndexSignature.errors.txt | 206 +++++++ ...jectOnInstantiatedCallSignature.errors.txt | 311 +++++++++++ ...nstantiatedConstructorSignature.errors.txt | 311 +++++++++++ ...SubtypeObjectOnOptionalProperty.errors.txt | 70 +++ ...atorWithSubtypeObjectOnProperty.errors.txt | 129 +++++ ...arisonOperatorWithTypeParameter.errors.txt | 50 +- .../instantiationExpressionErrors.errors.txt | 5 +- ...eralTypesWithVariousOperators01.errors.txt | 36 ++ 19 files changed, 3405 insertions(+), 7 deletions(-) create mode 100644 tests/baselines/reference/comparisonOperatorWithIdenticalObjects.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithIdenticalTypeParameter.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnOptionalProperty.errors.txt create mode 100644 tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesWithVariousOperators01.errors.txt diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.errors.txt b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.errors.txt new file mode 100644 index 0000000000000..1272a0d989e7a --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.errors.txt @@ -0,0 +1,365 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(61,12): error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(62,12): error TS2365: Operator '<' cannot be applied to types 'Base' and 'Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(63,12): error TS2365: Operator '<' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(64,12): error TS2365: Operator '<' cannot be applied to types 'A3' and 'B3'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(65,12): error TS2365: Operator '<' cannot be applied to types 'A4' and 'B4'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(66,12): error TS2365: Operator '<' cannot be applied to types 'A5' and 'B5'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(67,12): error TS2365: Operator '<' cannot be applied to types 'A6' and 'B6'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(69,12): error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(70,12): error TS2365: Operator '<' cannot be applied to types 'Base' and 'Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(71,12): error TS2365: Operator '<' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(72,12): error TS2365: Operator '<' cannot be applied to types 'B3' and 'A3'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(73,12): error TS2365: Operator '<' cannot be applied to types 'B4' and 'A4'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(74,12): error TS2365: Operator '<' cannot be applied to types 'B5' and 'A5'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(75,12): error TS2365: Operator '<' cannot be applied to types 'B6' and 'A6'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(78,12): error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(79,12): error TS2365: Operator '>' cannot be applied to types 'Base' and 'Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(80,12): error TS2365: Operator '>' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(81,12): error TS2365: Operator '>' cannot be applied to types 'A3' and 'B3'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(82,12): error TS2365: Operator '>' cannot be applied to types 'A4' and 'B4'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(83,12): error TS2365: Operator '>' cannot be applied to types 'A5' and 'B5'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(84,12): error TS2365: Operator '>' cannot be applied to types 'A6' and 'B6'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(86,12): error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(87,12): error TS2365: Operator '>' cannot be applied to types 'Base' and 'Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(88,12): error TS2365: Operator '>' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(89,12): error TS2365: Operator '>' cannot be applied to types 'B3' and 'A3'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(90,12): error TS2365: Operator '>' cannot be applied to types 'B4' and 'A4'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(91,12): error TS2365: Operator '>' cannot be applied to types 'B5' and 'A5'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(92,12): error TS2365: Operator '>' cannot be applied to types 'B6' and 'A6'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(95,12): error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(96,12): error TS2365: Operator '<=' cannot be applied to types 'Base' and 'Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(97,12): error TS2365: Operator '<=' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(98,12): error TS2365: Operator '<=' cannot be applied to types 'A3' and 'B3'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(99,12): error TS2365: Operator '<=' cannot be applied to types 'A4' and 'B4'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(100,12): error TS2365: Operator '<=' cannot be applied to types 'A5' and 'B5'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(101,12): error TS2365: Operator '<=' cannot be applied to types 'A6' and 'B6'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(103,12): error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(104,12): error TS2365: Operator '<=' cannot be applied to types 'Base' and 'Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(105,12): error TS2365: Operator '<=' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(106,12): error TS2365: Operator '<=' cannot be applied to types 'B3' and 'A3'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(107,12): error TS2365: Operator '<=' cannot be applied to types 'B4' and 'A4'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(108,12): error TS2365: Operator '<=' cannot be applied to types 'B5' and 'A5'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(109,12): error TS2365: Operator '<=' cannot be applied to types 'B6' and 'A6'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(112,12): error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(113,12): error TS2365: Operator '>=' cannot be applied to types 'Base' and 'Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(114,12): error TS2365: Operator '>=' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(115,12): error TS2365: Operator '>=' cannot be applied to types 'A3' and 'B3'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(116,12): error TS2365: Operator '>=' cannot be applied to types 'A4' and 'B4'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(117,12): error TS2365: Operator '>=' cannot be applied to types 'A5' and 'B5'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(118,12): error TS2365: Operator '>=' cannot be applied to types 'A6' and 'B6'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(120,12): error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(121,12): error TS2365: Operator '>=' cannot be applied to types 'Base' and 'Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(122,12): error TS2365: Operator '>=' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(123,12): error TS2365: Operator '>=' cannot be applied to types 'B3' and 'A3'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(124,12): error TS2365: Operator '>=' cannot be applied to types 'B4' and 'A4'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(125,12): error TS2365: Operator '>=' cannot be applied to types 'B5' and 'A5'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts(126,12): error TS2365: Operator '>=' cannot be applied to types 'B6' and 'A6'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts (56 errors) ==== + class A1 { + public a: string; + public b: number; + public c: boolean; + public d: any; + public e: Object; + public fn(a: string): string { + return null; + } + } + class B1 { + public a: string; + public b: number; + public c: boolean; + public d: any; + public e: Object; + public fn(b: string): string { + return null; + } + } + + class Base { + private a: string; + private fn(b: string): string { + return null; + } + } + class A2 extends Base { } + class B2 extends Base { } + + interface A3 { f(a: number): string; } + interface B3 { f(a: number): string; } + + interface A4 { new (a: string): A1; } + interface B4 { new (a: string): B1; } + + interface A5 { [x: number]: number; } + interface B5 { [x: number]: number; } + + interface A6 { [x: string]: string; } + interface B6 { [x: string]: string; } + + var a1: A1; + var a2: A2; + var a3: A3; + var a4: A4; + var a5: A5; + var a6: A6; + + var b1: B1; + var b2: B2; + var b3: B3; + var b4: B4; + var b5: B5; + var b6: B6; + + var base1: Base; + var base2: Base; + + // operator < + var r1a1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. + var r1a2 = base1 < base2; + ~~~~~~~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'Base' and 'Base'. + var r1a3 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'A2' and 'B2'. + var r1a4 = a3 < b3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'A3' and 'B3'. + var r1a5 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'A4' and 'B4'. + var r1a6 = a5 < b5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'A5' and 'B5'. + var r1a7 = a6 < b6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'A6' and 'B6'. + + var r1b1 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. + var r1b2 = base2 < base1; + ~~~~~~~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'Base' and 'Base'. + var r1b3 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'B2' and 'A2'. + var r1b4 = b3 < a3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'B3' and 'A3'. + var r1b5 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'B4' and 'A4'. + var r1b6 = b5 < a5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'B5' and 'A5'. + var r1b7 = b6 < a6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'B6' and 'A6'. + + // operator > + var r2a1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. + var r2a2 = base1 > base2; + ~~~~~~~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'Base' and 'Base'. + var r2a3 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'A2' and 'B2'. + var r2a4 = a3 > b3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'A3' and 'B3'. + var r2a5 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'A4' and 'B4'. + var r2a6 = a5 > b5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'A5' and 'B5'. + var r2a7 = a6 > b6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'A6' and 'B6'. + + var r2b1 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. + var r2b2 = base2 > base1; + ~~~~~~~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'Base' and 'Base'. + var r2b3 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'B2' and 'A2'. + var r2b4 = b3 > a3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'B3' and 'A3'. + var r2b5 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'B4' and 'A4'. + var r2b6 = b5 > a5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'B5' and 'A5'. + var r2b7 = b6 > a6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'B6' and 'A6'. + + // operator <= + var r3a1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. + var r3a2 = base1 <= base2; + ~~~~~~~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'Base' and 'Base'. + var r3a3 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'A2' and 'B2'. + var r3a4 = a3 <= b3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'A3' and 'B3'. + var r3a5 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'A4' and 'B4'. + var r3a6 = a5 <= b5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'A5' and 'B5'. + var r3a7 = a6 <= b6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'A6' and 'B6'. + + var r3b1 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. + var r3b2 = base2 <= base1; + ~~~~~~~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'Base' and 'Base'. + var r3b3 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'B2' and 'A2'. + var r3b4 = b3 <= a3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'B3' and 'A3'. + var r3b5 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'B4' and 'A4'. + var r3b6 = b5 <= a5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'B5' and 'A5'. + var r3b7 = b6 <= a6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'B6' and 'A6'. + + // operator >= + var r4a1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. + var r4a2 = base1 >= base2; + ~~~~~~~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'Base' and 'Base'. + var r4a3 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'A2' and 'B2'. + var r4a4 = a3 >= b3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'A3' and 'B3'. + var r4a5 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'A4' and 'B4'. + var r4a6 = a5 >= b5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'A5' and 'B5'. + var r4a7 = a6 >= b6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'A6' and 'B6'. + + var r4b1 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. + var r4b2 = base2 >= base1; + ~~~~~~~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'Base' and 'Base'. + var r4b3 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'B2' and 'A2'. + var r4b4 = b3 >= a3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'B3' and 'A3'. + var r4b5 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'B4' and 'A4'. + var r4b6 = b5 >= a5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'B5' and 'A5'. + var r4b7 = b6 >= a6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'B6' and 'A6'. + + // operator == + var r5a1 = a1 == b1; + var r5a2 = base1 == base2; + var r5a3 = a2 == b2; + var r5a4 = a3 == b3; + var r5a5 = a4 == b4; + var r5a6 = a5 == b5; + var r5a7 = a6 == b6; + + var r5b1 = b1 == a1; + var r5b2 = base2 == base1; + var r5b3 = b2 == a2; + var r5b4 = b3 == a3; + var r5b5 = b4 == a4; + var r5b6 = b5 == a5; + var r5b7 = b6 == a6; + + // operator != + var r6a1 = a1 != b1; + var r6a2 = base1 != base2; + var r6a3 = a2 != b2; + var r6a4 = a3 != b3; + var r6a5 = a4 != b4; + var r6a6 = a5 != b5; + var r6a7 = a6 != b6; + + var r6b1 = b1 != a1; + var r6b2 = base2 != base1; + var r6b3 = b2 != a2; + var r6b4 = b3 != a3; + var r6b5 = b4 != a4; + var r6b6 = b5 != a5; + var r6b7 = b6 != a6; + + // operator === + var r7a1 = a1 === b1; + var r7a2 = base1 === base2; + var r7a3 = a2 === b2; + var r7a4 = a3 === b3; + var r7a5 = a4 === b4; + var r7a6 = a5 === b5; + var r7a7 = a6 === b6; + + var r7b1 = b1 === a1; + var r7b2 = base2 === base1; + var r7b3 = b2 === a2; + var r7b4 = b3 === a3; + var r7b5 = b4 === a4; + var r7b6 = b5 === a5; + var r7b7 = b6 === a6; + + // operator !== + var r8a1 = a1 !== b1; + var r8a2 = base1 !== base2; + var r8a3 = a2 !== b2; + var r8a4 = a3 !== b3; + var r8a5 = a4 !== b4; + var r8a6 = a5 !== b5; + var r8a7 = a6 !== b6; + + var r8b1 = b1 !== a1; + var r8b2 = base2 !== base1; + var r8b3 = b2 !== a2; + var r8b4 = b3 !== a3; + var r8b5 = b4 !== a4; + var r8b6 = b5 !== a5; + var r8b7 = b6 !== a6; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalPrimitiveType.errors.txt b/tests/baselines/reference/comparisonOperatorWithIdenticalPrimitiveType.errors.txt index 4d2d26d9cdf02..758e67ab3a5d1 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalPrimitiveType.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalPrimitiveType.errors.txt @@ -1,22 +1,30 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(11,11): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(13,11): error TS2365: Operator '<' cannot be applied to types 'void' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(15,11): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(15,18): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(16,11): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(16,23): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(20,11): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(22,11): error TS2365: Operator '>' cannot be applied to types 'void' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(24,11): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(24,18): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(25,11): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(25,23): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(29,11): error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(31,11): error TS2365: Operator '<=' cannot be applied to types 'void' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(33,11): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(33,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(34,11): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(34,24): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(38,11): error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'boolean'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(40,11): error TS2365: Operator '>=' cannot be applied to types 'void' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(42,11): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(42,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(43,11): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(43,24): error TS18050: The value 'undefined' cannot be used here. -==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts (16 errors) ==== +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts (24 errors) ==== enum E { a, b, c } var a: number; @@ -28,8 +36,12 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator < var ra1 = a < a; var ra2 = b < b; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'boolean'. var ra3 = c < c; var ra4 = d < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'void'. var ra5 = e < e; var ra6 = null < null; ~~~~ @@ -45,8 +57,12 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator > var rb1 = a > a; var rb2 = b > b; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'boolean'. var rb3 = c > c; var rb4 = d > d; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'void'. var rb5 = e > e; var rb6 = null > null; ~~~~ @@ -62,8 +78,12 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator <= var rc1 = a <= a; var rc2 = b <= b; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'boolean'. var rc3 = c <= c; var rc4 = d <= d; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'void'. var rc5 = e <= e; var rc6 = null <= null; ~~~~ @@ -79,8 +99,12 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator >= var rd1 = a >= a; var rd2 = b >= b; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'boolean'. var rd3 = c >= c; var rd4 = d >= d; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'void'. var rd5 = e >= e; var rd6 = null >= null; ~~~~ diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithIdenticalTypeParameter.errors.txt new file mode 100644 index 0000000000000..0afa67edbcc4b --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalTypeParameter.errors.txt @@ -0,0 +1,25 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.ts(2,14): error TS2365: Operator '<' cannot be applied to types 'T' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.ts(3,14): error TS2365: Operator '>' cannot be applied to types 'T' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.ts(4,14): error TS2365: Operator '<=' cannot be applied to types 'T' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.ts(5,14): error TS2365: Operator '>=' cannot be applied to types 'T' and 'T'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.ts (4 errors) ==== + function foo(t: T) { + var r1 = t < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'T'. + var r2 = t > t; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'T' and 'T'. + var r3 = t <= t; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and 'T'. + var r4 = t >= t; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'T'. + var r5 = t == t; + var r6 = t != t; + var r7 = t === t; + var r8 = t !== t; + } \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt index ae391009f915a..03a01e793cc92 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt @@ -4,48 +4,56 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(38,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(39,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(41,12): error TS2365: Operator '<' cannot be applied to types '{ fn(t: T): T; }' and '{ fn(t: T[]): T; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(45,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(46,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(47,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(48,12): error TS2365: Operator '<' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(49,12): error TS2365: Operator '<' cannot be applied to types '{ fn(t: T[]): T; }' and '{ fn(t: T): T; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(52,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(53,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(54,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(55,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(56,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(58,12): error TS2365: Operator '>' cannot be applied to types '{ fn(t: T): T; }' and '{ fn(t: T[]): T; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(60,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(61,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(62,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(63,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(64,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(65,12): error TS2365: Operator '>' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(66,12): error TS2365: Operator '>' cannot be applied to types '{ fn(t: T[]): T; }' and '{ fn(t: T): T; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(69,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(70,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(71,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(72,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(73,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(75,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(t: T): T; }' and '{ fn(t: T[]): T; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(77,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(78,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(79,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(80,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(81,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(82,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(83,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(t: T[]): T; }' and '{ fn(t: T): T; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(86,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(87,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(88,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(89,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(90,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(91,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(92,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(t: T): T; }' and '{ fn(t: T[]): T; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(94,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(95,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(96,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(97,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(98,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(99,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(100,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(t: T[]): T; }' and '{ fn(t: T): T; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(103,12): error TS2367: This comparison appears to be unintentional because the types '{ fn(): Base; }' and 'new () => Base' have no overlap. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(104,12): error TS2367: This comparison appears to be unintentional because 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 comparison appears to be unintentional because the types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }' have no overlap. @@ -96,7 +104,7 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts(167,12): error TS2367: This comparison appears to be unintentional because the types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }' have no overlap. -==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts (96 errors) ==== +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts (104 errors) ==== class Base { public a: string; } @@ -150,6 +158,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r1a7 = a7 < b7; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(t: T): T; }' and '{ fn(t: T[]): T; }'. var r1b1 = b1 < a1; ~~~~~~~ @@ -170,6 +180,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '<' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r1b7 = b7 < a7; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(t: T[]): T; }' and '{ fn(t: T): T; }'. // operator > var r2a1 = a1 > b1; @@ -191,6 +203,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r2a7 = a7 > b7; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(t: T): T; }' and '{ fn(t: T[]): T; }'. var r2b1 = b1 > a1; ~~~~~~~ @@ -211,6 +225,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '>' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r2b7 = b7 > a7; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(t: T[]): T; }' and '{ fn(t: T): T; }'. // operator <= var r3a1 = a1 <= b1; @@ -232,6 +248,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r3a7 = a7 <= b7; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(t: T): T; }' and '{ fn(t: T[]): T; }'. var r3b1 = b1 <= a1; ~~~~~~~~ @@ -252,6 +270,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r3b7 = b7 <= a7; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(t: T[]): T; }' and '{ fn(t: T): T; }'. // operator >= var r4a1 = a1 >= b1; @@ -273,6 +293,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r4a7 = a7 >= b7; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(t: T): T; }' and '{ fn(t: T[]): T; }'. var r4b1 = b1 >= a1; ~~~~~~~~ @@ -293,6 +315,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r4b7 = b7 >= a7; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(t: T[]): T; }' and '{ fn(t: T): T; }'. // operator == var r5a1 = a1 == b1; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt index 3aeb6d02d7d79..17aaf5c44fed6 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt @@ -4,48 +4,56 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(38,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => C'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(39,12): error TS2365: Operator '<' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(41,12): error TS2365: Operator '<' cannot be applied to types 'new (t: T) => T' and 'new (t: T[]) => T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(45,12): error TS2365: Operator '<' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(46,12): error TS2365: Operator '<' cannot be applied to types 'new () => C' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(47,12): error TS2365: Operator '<' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(48,12): error TS2365: Operator '<' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(49,12): error TS2365: Operator '<' cannot be applied to types 'new (t: T[]) => T' and 'new (t: T) => T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(52,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(53,12): error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(54,12): error TS2365: Operator '>' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(55,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => C'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(56,12): error TS2365: Operator '>' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(58,12): error TS2365: Operator '>' cannot be applied to types 'new (t: T) => T' and 'new (t: T[]) => T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(60,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(61,12): error TS2365: Operator '>' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(62,12): error TS2365: Operator '>' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(63,12): error TS2365: Operator '>' cannot be applied to types 'new () => C' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(64,12): error TS2365: Operator '>' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(65,12): error TS2365: Operator '>' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(66,12): error TS2365: Operator '>' cannot be applied to types 'new (t: T[]) => T' and 'new (t: T) => T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(69,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(70,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(71,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(72,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => C'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(73,12): error TS2365: Operator '<=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(75,12): error TS2365: Operator '<=' cannot be applied to types 'new (t: T) => T' and 'new (t: T[]) => T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(77,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(78,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(79,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(80,12): error TS2365: Operator '<=' cannot be applied to types 'new () => C' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(81,12): error TS2365: Operator '<=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(82,12): error TS2365: Operator '<=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(83,12): error TS2365: Operator '<=' cannot be applied to types 'new (t: T[]) => T' and 'new (t: T) => T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(86,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(87,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(88,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(89,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => C'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(90,12): error TS2365: Operator '>=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(91,12): error TS2365: Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(92,12): error TS2365: Operator '>=' cannot be applied to types 'new (t: T) => T' and 'new (t: T[]) => T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(94,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(95,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(96,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(97,12): error TS2365: Operator '>=' cannot be applied to types 'new () => C' and 'new () => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(98,12): error TS2365: Operator '>=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(99,12): error TS2365: Operator '>=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(100,12): error TS2365: Operator '>=' cannot be applied to types 'new (t: T[]) => T' and 'new (t: T) => T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(103,12): error TS2367: This comparison appears to be unintentional because the types '{ fn(): Base; }' and 'new () => Base' have no overlap. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(104,12): error TS2367: This comparison appears to be unintentional because 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 comparison appears to be unintentional because the types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base' have no overlap. @@ -96,7 +104,7 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts(167,12): error TS2367: This comparison appears to be unintentional because the types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base' have no overlap. -==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts (96 errors) ==== +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts (104 errors) ==== class Base { public a: string; } @@ -150,6 +158,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r1a7 = a7 < b7; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (t: T) => T' and 'new (t: T[]) => T'. var r1b1 = b1 < a1; ~~~~~~~ @@ -170,6 +180,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r1b7 = b7 < a7; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (t: T[]) => T' and 'new (t: T) => T'. // operator > var r2a1 = a1 > b1; @@ -191,6 +203,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r2a7 = a7 > b7; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (t: T) => T' and 'new (t: T[]) => T'. var r2b1 = b1 > a1; ~~~~~~~ @@ -211,6 +225,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '>' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r2b7 = b7 > a7; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (t: T[]) => T' and 'new (t: T) => T'. // operator <= var r3a1 = a1 <= b1; @@ -232,6 +248,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r3a7 = a7 <= b7; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (t: T) => T' and 'new (t: T[]) => T'. var r3b1 = b1 <= a1; ~~~~~~~~ @@ -252,6 +270,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '<=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r3b7 = b7 <= a7; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (t: T[]) => T' and 'new (t: T) => T'. // operator >= var r4a1 = a1 >= b1; @@ -273,6 +293,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r4a7 = a7 >= b7; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (t: T) => T' and 'new (t: T[]) => T'. var r4b1 = b1 >= a1; ~~~~~~~~ @@ -293,6 +315,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '>=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r4b7 = b7 >= a7; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (t: T[]) => T' and 'new (t: T) => T'. // operator == var r5a1 = a1 == b1; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt index 250547161909f..f48c51d4d159e 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt @@ -1,27 +1,35 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(26,12): error TS2365: Operator '<' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(27,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(28,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(29,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(31,12): error TS2365: Operator '<' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(33,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(34,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(37,12): error TS2365: Operator '>' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(38,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(39,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(40,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(42,12): error TS2365: Operator '>' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(43,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(44,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(45,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(48,12): error TS2365: Operator '<=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(49,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(50,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(51,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(53,12): error TS2365: Operator '<=' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(54,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(55,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(56,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(59,12): error TS2365: Operator '>=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(60,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(61,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(62,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'. 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(67,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(70,12): error TS2367: This comparison appears to be unintentional because 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 comparison appears to be unintentional because 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 comparison appears to be unintentional because the types '{ [index: number]: Base; }' and '{ [index: number]: C; }' have no overlap. @@ -48,7 +56,7 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(110,12): error TS2367: This comparison appears to be unintentional because the types '{ [index: number]: C; }' and '{ [index: number]: Base; }' have no overlap. -==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts (48 errors) ==== +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts (56 errors) ==== class Base { public a: string; } @@ -84,6 +92,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'. var r1a4 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'. var r1b1 = b1 < a1; ~~~~~~~ @@ -95,6 +105,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'. var r1b4 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'. // operator > var r2a1 = a1 > b1; @@ -107,6 +119,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'. var r2a4 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'. var r2b1 = b1 > a1; ~~~~~~~ @@ -118,6 +132,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~ !!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'. var r2b4 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'. // operator <= var r3a1 = a1 <= b1; @@ -130,6 +146,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'. var r3a4 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'. var r3b1 = b1 <= a1; ~~~~~~~~ @@ -141,6 +159,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'. var r3b4 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'. // operator >= var r4a1 = a1 >= b1; @@ -153,6 +173,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'. var r4a4 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'. var r4b1 = b1 >= a1; ~~~~~~~~ @@ -164,6 +186,8 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso ~~~~~~~~ !!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'. var r4b4 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'. // operator == var r5a1 = a1 == b1; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt new file mode 100644 index 0000000000000..1967f12249465 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt @@ -0,0 +1,296 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(33,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(34,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(35,12): error TS2365: Operator '<' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(36,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(37,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: Base, y: C): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(39,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: string): number; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(41,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x?: string): number; }' and '{ fn(x?: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(42,12): error TS2365: Operator '<' cannot be applied to types '{ fn(...x: string[]): number; }' and '{ fn(...x: T[]): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: Base, y: C): Base; }' and '{ fn(x: T, y: U): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(47,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(48,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(49,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(50,12): error TS2365: Operator '>' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(51,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(52,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: Base, y: C): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(54,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(55,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: string): number; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(56,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x?: string): number; }' and '{ fn(x?: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types '{ fn(...x: string[]): number; }' and '{ fn(...x: T[]): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(58,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(59,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: Base, y: C): Base; }' and '{ fn(x: T, y: U): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(62,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(63,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(64,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(65,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(66,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(67,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: Base, y: C): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(69,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(70,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string): number; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(71,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x?: string): number; }' and '{ fn(x?: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(72,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(...x: string[]): number; }' and '{ fn(...x: T[]): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(73,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: Base, y: C): Base; }' and '{ fn(x: T, y: U): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(77,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(78,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(79,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(80,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): number; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(81,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(82,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: Base, y: C): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(84,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(85,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string): number; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(86,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x?: string): number; }' and '{ fn(x?: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(87,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(...x: string[]): number; }' and '{ fn(...x: T[]): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(88,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(89,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: Base, y: C): Base; }' and '{ fn(x: T, y: U): T; }'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts (48 errors) ==== + class Base { + public a: string; + } + + class Derived extends Base { + public b: string; + } + + class C { + public c: string; + } + + var a1: { fn(x: T): T }; + var b1: { fn(): string }; + + var a2: { fn(x: T): T }; + var b2: { fn(x: string): number }; + + var a3: { fn(x?: T): T }; + var b3: { fn(x?: string): number }; + + var a4: { fn(...x: T[]): T }; + var b4: { fn(...x: string[]): number }; + + var a5: { fn(x: T, y: T): T }; + var b5: { fn(x: string, y: number): string }; + + var a6: { fn(x: T, y: U): T }; + var b6: { fn(x: Base, y: C): Base }; + + // operator < + var r1a1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(): string; }'. + var r1a2 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): number; }'. + var r1a3 = a3 < b3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): number; }'. + var r1a4 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): number; }'. + var r1a5 = a5 < b5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): string; }'. + var r1a6 = a6 < b6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: Base, y: C): Base; }'. + + var r1b1 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): string; }' and '{ fn(x: T): T; }'. + var r1b2 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: string): number; }' and '{ fn(x: T): T; }'. + var r1b3 = b3 < a3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x?: string): number; }' and '{ fn(x?: T): T; }'. + var r1b4 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...x: string[]): number; }' and '{ fn(...x: T[]): T; }'. + var r1b5 = b5 < a5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: T): T; }'. + var r1b6 = b6 < a6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: Base, y: C): Base; }' and '{ fn(x: T, y: U): T; }'. + + // operator > + var r2a1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(): string; }'. + var r2a2 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): number; }'. + var r2a3 = a3 > b3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): number; }'. + var r2a4 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): number; }'. + var r2a5 = a5 > b5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): string; }'. + var r2a6 = a6 > b6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: Base, y: C): Base; }'. + + var r2b1 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): string; }' and '{ fn(x: T): T; }'. + var r2b2 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: string): number; }' and '{ fn(x: T): T; }'. + var r2b3 = b3 > a3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x?: string): number; }' and '{ fn(x?: T): T; }'. + var r2b4 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...x: string[]): number; }' and '{ fn(...x: T[]): T; }'. + var r2b5 = b5 > a5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: T): T; }'. + var r2b6 = b6 > a6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: Base, y: C): Base; }' and '{ fn(x: T, y: U): T; }'. + + // operator <= + var r3a1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(): string; }'. + var r3a2 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): number; }'. + var r3a3 = a3 <= b3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): number; }'. + var r3a4 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): number; }'. + var r3a5 = a5 <= b5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): string; }'. + var r3a6 = a6 <= b6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: Base, y: C): Base; }'. + + var r3b1 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): string; }' and '{ fn(x: T): T; }'. + var r3b2 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string): number; }' and '{ fn(x: T): T; }'. + var r3b3 = b3 <= a3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x?: string): number; }' and '{ fn(x?: T): T; }'. + var r3b4 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...x: string[]): number; }' and '{ fn(...x: T[]): T; }'. + var r3b5 = b5 <= a5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: T): T; }'. + var r3b6 = b6 <= a6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: Base, y: C): Base; }' and '{ fn(x: T, y: U): T; }'. + + // operator >= + var r4a1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(): string; }'. + var r4a2 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): number; }'. + var r4a3 = a3 >= b3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): number; }'. + var r4a4 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): number; }'. + var r4a5 = a5 >= b5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): string; }'. + var r4a6 = a6 >= b6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: Base, y: C): Base; }'. + + var r4b1 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): string; }' and '{ fn(x: T): T; }'. + var r4b2 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string): number; }' and '{ fn(x: T): T; }'. + var r4b3 = b3 >= a3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x?: string): number; }' and '{ fn(x?: T): T; }'. + var r4b4 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...x: string[]): number; }' and '{ fn(...x: T[]): T; }'. + var r4b5 = b5 >= a5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: T): T; }'. + var r4b6 = b6 >= a6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: Base, y: C): Base; }' and '{ fn(x: T, y: U): T; }'. + + // operator == + var r5a1 = a1 == b1; + var r5a2 = a2 == b2; + var r5a3 = a3 == b3; + var r5a4 = a4 == b4; + var r5a5 = a5 == b5; + var r5a6 = a6 == b6; + + var r5b1 = b1 == a1; + var r5b2 = b2 == a2; + var r5b3 = b3 == a3; + var r5b4 = b4 == a4; + var r5b5 = b5 == a5; + var r5b6 = b6 == a6; + + // operator != + var r6a1 = a1 != b1; + var r6a2 = a2 != b2; + var r6a3 = a3 != b3; + var r6a4 = a4 != b4; + var r6a5 = a5 != b5; + var r6a6 = a6 != b6; + + var r6b1 = b1 != a1; + var r6b2 = b2 != a2; + var r6b3 = b3 != a3; + var r6b4 = b4 != a4; + var r6b5 = b5 != a5; + var r6b6 = b6 != a6; + + // operator === + var r7a1 = a1 === b1; + var r7a2 = a2 === b2; + var r7a3 = a3 === b3; + var r7a4 = a4 === b4; + var r7a5 = a5 === b5; + var r7a6 = a6 === b6; + + var r7b1 = b1 === a1; + var r7b2 = b2 === a2; + var r7b3 = b3 === a3; + var r7b4 = b4 === a4; + var r7b5 = b5 === a5; + var r7b6 = b6 === a6; + + // operator !== + var r8a1 = a1 !== b1; + var r8a2 = a2 !== b2; + var r8a3 = a3 !== b3; + var r8a4 = a4 !== b4; + var r8a5 = a5 !== b5; + var r8a6 = a6 !== b6; + + var r8b1 = b1 !== a1; + var r8b2 = b2 !== a2; + var r8b3 = b3 !== a3; + var r8b4 = b4 !== a4; + var r8b5 = b5 !== a5; + var r8b6 = b6 !== a6; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt new file mode 100644 index 0000000000000..b73e4fc1873b5 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt @@ -0,0 +1,296 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new () => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(33,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(34,12): error TS2365: Operator '<' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(35,12): error TS2365: Operator '<' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(36,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(37,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: Base, y: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(39,12): error TS2365: Operator '<' cannot be applied to types 'new () => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types 'new (x: string) => number' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(41,12): error TS2365: Operator '<' cannot be applied to types 'new (x?: string) => number' and 'new (x?: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(42,12): error TS2365: Operator '<' cannot be applied to types 'new (...x: string[]) => number' and 'new (...x: T[]) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types 'new (x: Base, y: C) => Base' and 'new (x: T, y: U) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(47,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new () => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(48,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(49,12): error TS2365: Operator '>' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(50,12): error TS2365: Operator '>' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(51,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(52,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: Base, y: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(54,12): error TS2365: Operator '>' cannot be applied to types 'new () => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(55,12): error TS2365: Operator '>' cannot be applied to types 'new (x: string) => number' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(56,12): error TS2365: Operator '>' cannot be applied to types 'new (x?: string) => number' and 'new (x?: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types 'new (...x: string[]) => number' and 'new (...x: T[]) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(58,12): error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(59,12): error TS2365: Operator '>' cannot be applied to types 'new (x: Base, y: C) => Base' and 'new (x: T, y: U) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(62,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new () => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(63,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(64,12): error TS2365: Operator '<=' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(65,12): error TS2365: Operator '<=' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(66,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(67,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: Base, y: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(69,12): error TS2365: Operator '<=' cannot be applied to types 'new () => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(70,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: string) => number' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(71,12): error TS2365: Operator '<=' cannot be applied to types 'new (x?: string) => number' and 'new (x?: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(72,12): error TS2365: Operator '<=' cannot be applied to types 'new (...x: string[]) => number' and 'new (...x: T[]) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(73,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: Base, y: C) => Base' and 'new (x: T, y: U) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(77,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new () => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(78,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(79,12): error TS2365: Operator '>=' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(80,12): error TS2365: Operator '>=' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(81,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(82,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: Base, y: C) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(84,12): error TS2365: Operator '>=' cannot be applied to types 'new () => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(85,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: string) => number' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(86,12): error TS2365: Operator '>=' cannot be applied to types 'new (x?: string) => number' and 'new (x?: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(87,12): error TS2365: Operator '>=' cannot be applied to types 'new (...x: string[]) => number' and 'new (...x: T[]) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(88,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(89,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: Base, y: C) => Base' and 'new (x: T, y: U) => T'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts (48 errors) ==== + class Base { + public a: string; + } + + class Derived extends Base { + public b: string; + } + + class C { + public c: string; + } + + var a1: { new (x: T): T }; + var b1: { new (): string }; + + var a2: { new (x: T): T }; + var b2: { new (x: string): number }; + + var a3: { new (x?: T): T }; + var b3: { new (x?: string): number }; + + var a4: { new (...x: T[]): T }; + var b4: { new (...x: string[]): number }; + + var a5: { new (x: T, y: T): T }; + var b5: { new (x: string, y: number): string }; + + var a6: { new (x: T, y: U): T }; + var b6: { new (x: Base, y: C): Base }; + + // operator < + var r1a1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new () => string'. + var r1a2 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => number'. + var r1a3 = a3 < b3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => number'. + var r1a4 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => number'. + var r1a5 = a5 < b5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => string'. + var r1a6 = a6 < b6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: Base, y: C) => Base'. + + var r1b1 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new () => string' and 'new (x: T) => T'. + var r1b2 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: string) => number' and 'new (x: T) => T'. + var r1b3 = b3 < a3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x?: string) => number' and 'new (x?: T) => T'. + var r1b4 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (...x: string[]) => number' and 'new (...x: T[]) => T'. + var r1b5 = b5 < a5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: T) => T'. + var r1b6 = b6 < a6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: Base, y: C) => Base' and 'new (x: T, y: U) => T'. + + // operator > + var r2a1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new () => string'. + var r2a2 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => number'. + var r2a3 = a3 > b3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => number'. + var r2a4 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => number'. + var r2a5 = a5 > b5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => string'. + var r2a6 = a6 > b6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: Base, y: C) => Base'. + + var r2b1 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new () => string' and 'new (x: T) => T'. + var r2b2 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: string) => number' and 'new (x: T) => T'. + var r2b3 = b3 > a3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x?: string) => number' and 'new (x?: T) => T'. + var r2b4 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (...x: string[]) => number' and 'new (...x: T[]) => T'. + var r2b5 = b5 > a5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: T) => T'. + var r2b6 = b6 > a6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: Base, y: C) => Base' and 'new (x: T, y: U) => T'. + + // operator <= + var r3a1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new () => string'. + var r3a2 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => number'. + var r3a3 = a3 <= b3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => number'. + var r3a4 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => number'. + var r3a5 = a5 <= b5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => string'. + var r3a6 = a6 <= b6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: Base, y: C) => Base'. + + var r3b1 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => string' and 'new (x: T) => T'. + var r3b2 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: string) => number' and 'new (x: T) => T'. + var r3b3 = b3 <= a3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x?: string) => number' and 'new (x?: T) => T'. + var r3b4 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...x: string[]) => number' and 'new (...x: T[]) => T'. + var r3b5 = b5 <= a5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: T) => T'. + var r3b6 = b6 <= a6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: Base, y: C) => Base' and 'new (x: T, y: U) => T'. + + // operator >= + var r4a1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new () => string'. + var r4a2 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => number'. + var r4a3 = a3 >= b3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => number'. + var r4a4 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => number'. + var r4a5 = a5 >= b5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => string'. + var r4a6 = a6 >= b6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: Base, y: C) => Base'. + + var r4b1 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => string' and 'new (x: T) => T'. + var r4b2 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: string) => number' and 'new (x: T) => T'. + var r4b3 = b3 >= a3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x?: string) => number' and 'new (x?: T) => T'. + var r4b4 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...x: string[]) => number' and 'new (...x: T[]) => T'. + var r4b5 = b5 >= a5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: T) => T'. + var r4b6 = b6 >= a6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: Base, y: C) => Base' and 'new (x: T, y: U) => T'. + + // operator == + var r5a1 = a1 == b1; + var r5a2 = a2 == b2; + var r5a3 = a3 == b3; + var r5a4 = a4 == b4; + var r5a5 = a5 == b5; + var r5a6 = a6 == b6; + + var r5b1 = b1 == a1; + var r5b2 = b2 == a2; + var r5b3 = b3 == a3; + var r5b4 = b4 == a4; + var r5b5 = b5 == a5; + var r5b6 = b6 == a6; + + // operator != + var r6a1 = a1 != b1; + var r6a2 = a2 != b2; + var r6a3 = a3 != b3; + var r6a4 = a4 != b4; + var r6a5 = a5 != b5; + var r6a6 = a6 != b6; + + var r6b1 = b1 != a1; + var r6b2 = b2 != a2; + var r6b3 = b3 != a3; + var r6b4 = b4 != a4; + var r6b5 = b5 != a5; + var r6b6 = b6 != a6; + + // operator === + var r7a1 = a1 === b1; + var r7a2 = a2 === b2; + var r7a3 = a3 === b3; + var r7a4 = a4 === b4; + var r7a5 = a5 === b5; + var r7a6 = a6 === b6; + + var r7b1 = b1 === a1; + var r7b2 = b2 === a2; + var r7b3 = b3 === a3; + var r7b4 = b4 === a4; + var r7b5 = b5 === a5; + var r7b6 = b6 === a6; + + // operator !== + var r8a1 = a1 !== b1; + var r8a2 = a2 !== b2; + var r8a3 = a3 !== b3; + var r8a4 = a4 !== b4; + var r8a5 = a5 !== b5; + var r8a6 = a6 !== b6; + + var r8b1 = b1 !== a1; + var r8b2 = b2 !== a2; + var r8b3 = b3 !== a3; + var r8b4 = b4 !== a4; + var r8b5 = b5 !== a5; + var r8b6 = b6 !== a6; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt index de8a8ac3ce14c..d1fc08876f7ce 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt @@ -6,41 +6,121 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(17,14): error TS2367: This comparison appears to be unintentional because the types 'T' and 'U' have no overlap. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(18,14): error TS2367: This comparison appears to be unintentional because the types 'T' and 'U' have no overlap. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(19,14): error TS2367: This comparison appears to be unintentional because the types 'T' and 'U' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(22,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(23,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(24,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(25,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(26,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(27,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(28,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(30,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(31,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(32,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(33,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(34,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(35,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(36,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(39,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(40,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(41,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(42,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(43,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(44,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(45,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(47,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(48,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(49,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(50,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(51,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(52,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(53,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(56,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(57,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(58,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(59,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(60,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(61,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(62,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(64,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(65,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(66,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(67,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(68,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(69,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(70,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(73,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(74,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(75,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(76,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(77,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(78,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(79,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(81,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(82,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(83,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(84,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(85,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(86,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(87,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(90,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(91,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(92,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(93,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(94,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(95,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(96,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(98,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(99,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(100,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(101,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(102,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(103,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(104,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(107,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(108,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(109,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(110,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(111,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(112,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(113,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(115,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(116,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(117,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(118,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(119,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(120,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(121,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(124,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(125,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(126,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(127,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(128,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(129,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(130,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(132,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(133,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(134,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(135,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(136,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(137,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(138,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(141,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(142,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(143,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(144,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(145,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(146,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(147,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(149,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(150,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(151,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(152,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(153,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(154,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(155,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. -==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts (40 errors) ==== +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts (120 errors) ==== enum E { a, b, c } var a: boolean; @@ -79,201 +159,361 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator < var r1a1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r1a2 = t < b; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r1a3 = t < c; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r1a4 = t < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r1a5 = t < e; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r1a6 = t < f; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r1a7 = t < g; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r1b1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r1b2 = b < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r1b3 = c < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r1b4 = d < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r1b5 = e < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r1b6 = f < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r1b7 = g < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator > var r2a1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r2a2 = t < b; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r2a3 = t < c; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r2a4 = t < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r2a5 = t < e; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r2a6 = t < f; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r2a7 = t < g; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r2b1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r2b2 = b < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r2b3 = c < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r2b4 = d < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r2b5 = e < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r2b6 = f < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r2b7 = g < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator <= var r3a1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r3a2 = t < b; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r3a3 = t < c; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r3a4 = t < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r3a5 = t < e; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r3a6 = t < f; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r3a7 = t < g; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r3b1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r3b2 = b < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r3b3 = c < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r3b4 = d < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r3b5 = e < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r3b6 = f < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r3b7 = g < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator >= var r4a1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r4a2 = t < b; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r4a3 = t < c; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r4a4 = t < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r4a5 = t < e; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r4a6 = t < f; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r4a7 = t < g; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r4b1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r4b2 = b < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r4b3 = c < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r4b4 = d < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r4b5 = e < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r4b6 = f < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r4b7 = g < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator == var r5a1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r5a2 = t < b; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r5a3 = t < c; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r5a4 = t < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r5a5 = t < e; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r5a6 = t < f; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r5a7 = t < g; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r5b1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r5b2 = b < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r5b3 = c < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r5b4 = d < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r5b5 = e < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r5b6 = f < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r5b7 = g < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator != var r6a1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r6a2 = t < b; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r6a3 = t < c; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r6a4 = t < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r6a5 = t < e; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r6a6 = t < f; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r6a7 = t < g; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r6b1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r6b2 = b < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r6b3 = c < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r6b4 = d < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r6b5 = e < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r6b6 = f < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r6b7 = g < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator === var r7a1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r7a2 = t < b; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r7a3 = t < c; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r7a4 = t < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r7a5 = t < e; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r7a6 = t < f; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r7a7 = t < g; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r7b1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r7b2 = b < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r7b3 = c < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r7b4 = d < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r7b5 = e < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r7b6 = f < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r7b7 = g < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator !== var r8a1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r8a2 = t < b; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r8a3 = t < c; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r8a4 = t < d; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r8a5 = t < e; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r8a6 = t < f; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r8a7 = t < g; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r8b1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r8b2 = b < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r8b3 = c < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r8b4 = d < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r8b5 = e < t; ~~~~~ !!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r8b6 = f < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r8b7 = g < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.errors.txt new file mode 100644 index 0000000000000..b5348836b5fd8 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.errors.txt @@ -0,0 +1,526 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(46,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(47,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(48,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(49,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(50,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: Base): void; }' and '{ fn(a: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(51,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(52,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): void; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(53,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(54,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(55,13): error TS2365: Operator '<' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(56,13): error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: Derived[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(59,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(60,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(61,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: number): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(62,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(63,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: Derived): void; }' and '{ fn(a: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(64,12): error TS2365: Operator '<' cannot be applied to types '{ fn(a: Base, b: Derived): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(65,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(66,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(67,12): error TS2365: Operator '<' cannot be applied to types '{ fn(): Derived; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(68,13): error TS2365: Operator '<' cannot be applied to types '{ fn(a?: Derived): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(69,13): error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Derived[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(73,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(74,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(75,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(76,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(77,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: Base): void; }' and '{ fn(a: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(78,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(79,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): void; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(80,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(81,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(82,13): error TS2365: Operator '>' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(83,13): error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: Derived[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(86,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(87,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(88,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: number): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(89,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(90,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: Derived): void; }' and '{ fn(a: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(91,12): error TS2365: Operator '>' cannot be applied to types '{ fn(a: Base, b: Derived): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(92,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(93,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(94,12): error TS2365: Operator '>' cannot be applied to types '{ fn(): Derived; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(95,13): error TS2365: Operator '>' cannot be applied to types '{ fn(a?: Derived): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(96,13): error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Derived[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(100,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(101,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(102,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(103,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(104,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Base): void; }' and '{ fn(a: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(105,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(106,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): void; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(107,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(108,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(109,13): error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(110,13): error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: Derived[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(113,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(114,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(115,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(116,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(117,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Derived): void; }' and '{ fn(a: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(118,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Base, b: Derived): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(119,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(120,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(121,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(): Derived; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(122,13): error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: Derived): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(123,13): error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Derived[]): void; }' and '{ fn(...a: Base[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(127,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(128,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(129,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(130,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(131,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Base): void; }' and '{ fn(a: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(132,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(133,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): void; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(134,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(135,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(136,13): error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: Derived): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(137,13): error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: Derived[]): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(140,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(141,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(142,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(143,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): void; }' and '{ fn(a: number, b: string): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(144,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Derived): void; }' and '{ fn(a: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(145,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Base, b: Derived): void; }' and '{ fn(a: Derived, b: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(146,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(147,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(148,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(): Derived; }' and '{ fn(): Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(149,13): error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: Derived): void; }' and '{ fn(a?: Base): void; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts(150,13): error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Derived[]): void; }' and '{ fn(...a: Base[]): void; }'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts (88 errors) ==== + class Base { + public a: string; + } + + class Derived extends Base { + public b: string; + } + + var a1: { fn(): void }; + var b1: { fn(): void }; + + var a2: { fn(a: number, b: string): void }; + var b2: { fn(a: number, b: string): void }; + + var a3: { fn(a: number, b: string): void }; + var b3: { fn(a: number): void }; + + var a4: { fn(a: number, b: string): void }; + var b4: { fn(): void }; + + var a5: { fn(a: Base): void }; + var b5: { fn(a: Derived): void }; + + var a6: { fn(a: Derived, b: Base): void }; + var b6: { fn(a: Base, b: Derived): void }; + + var a7: { fn(): void }; + var b7: { fn(): Base }; + + var a8: { fn(): Base }; + var b8: { fn(): Base }; + + var a9: { fn(): Base }; + var b9: { fn(): Derived }; + + var a10: { fn(a?: Base): void }; + var b10: { fn(a?: Derived): void }; + + var a11: { fn(...a: Base[]): void }; + var b11: { fn(...a: Derived[]): void }; + + //var a12: { fn(t: T, u: U): T[] }; + //var b12: { fn(a: A, b: B): A[] }; + + // operator < + var r1a1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. + var r1a2 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. + var r1a3 = a3 < b3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number): void; }'. + var r1a4 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(): void; }'. + var r1a5 = a5 < b5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: Base): void; }' and '{ fn(a: Derived): void; }'. + var r1a6 = a6 < b6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: Derived): void; }'. + var r1a7 = a7 < b7; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): void; }' and '{ fn(): Base; }'. + var r1a8 = a8 < b8; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. + var r1a9 = a9 < b9; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Derived; }'. + var r1a10 = a10 < b10; + ~~~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: Derived): void; }'. + var r1a11 = a11 < b11; + ~~~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: Derived[]): void; }'. + //var r1a12 = a12 < b12; + + var r1b1 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. + var r1b2 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. + var r1b3 = b3 < a3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: number): void; }' and '{ fn(a: number, b: string): void; }'. + var r1b4 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): void; }' and '{ fn(a: number, b: string): void; }'. + var r1b5 = b5 < a5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: Derived): void; }' and '{ fn(a: Base): void; }'. + var r1b6 = b6 < a6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: Base, b: Derived): void; }' and '{ fn(a: Derived, b: Base): void; }'. + var r1b7 = b7 < a7; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): void; }'. + var r1b8 = b8 < a8; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. + var r1b9 = b9 < a9; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Derived; }' and '{ fn(): Base; }'. + var r1b10 = b10 < a10; + ~~~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a?: Derived): void; }' and '{ fn(a?: Base): void; }'. + var r1b11 = b11 < a11; + ~~~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Derived[]): void; }' and '{ fn(...a: Base[]): void; }'. + //var r1b12 = b12 < a12; + + // operator > + var r2a1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. + var r2a2 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. + var r2a3 = a3 > b3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number): void; }'. + var r2a4 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(): void; }'. + var r2a5 = a5 > b5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: Base): void; }' and '{ fn(a: Derived): void; }'. + var r2a6 = a6 > b6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: Derived): void; }'. + var r2a7 = a7 > b7; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): void; }' and '{ fn(): Base; }'. + var r2a8 = a8 > b8; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. + var r2a9 = a9 > b9; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Derived; }'. + var r2a10 = a10 > b10; + ~~~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: Derived): void; }'. + var r2a11 = a11 > b11; + ~~~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: Derived[]): void; }'. + //var r2a12 = a12 > b12; + + var r2b1 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. + var r2b2 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. + var r2b3 = b3 > a3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: number): void; }' and '{ fn(a: number, b: string): void; }'. + var r2b4 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): void; }' and '{ fn(a: number, b: string): void; }'. + var r2b5 = b5 > a5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: Derived): void; }' and '{ fn(a: Base): void; }'. + var r2b6 = b6 > a6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: Base, b: Derived): void; }' and '{ fn(a: Derived, b: Base): void; }'. + var r2b7 = b7 > a7; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): void; }'. + var r2b8 = b8 > a8; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. + var r2b9 = b9 > a9; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Derived; }' and '{ fn(): Base; }'. + var r2b10 = b10 > a10; + ~~~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a?: Derived): void; }' and '{ fn(a?: Base): void; }'. + var r2b11 = b11 > a11; + ~~~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Derived[]): void; }' and '{ fn(...a: Base[]): void; }'. + //var r2b12 = b12 > a12; + + // operator <= + var r3a1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. + var r3a2 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. + var r3a3 = a3 <= b3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number): void; }'. + var r3a4 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(): void; }'. + var r3a5 = a5 <= b5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Base): void; }' and '{ fn(a: Derived): void; }'. + var r3a6 = a6 <= b6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: Derived): void; }'. + var r3a7 = a7 <= b7; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): void; }' and '{ fn(): Base; }'. + var r3a8 = a8 <= b8; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. + var r3a9 = a9 <= b9; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Derived; }'. + var r3a10 = a10 <= b10; + ~~~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: Derived): void; }'. + var r3a11 = a11 <= b11; + ~~~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: Derived[]): void; }'. + //var r3a12 = a12 <= b12; + + var r3b1 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. + var r3b2 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. + var r3b3 = b3 <= a3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number): void; }' and '{ fn(a: number, b: string): void; }'. + var r3b4 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): void; }' and '{ fn(a: number, b: string): void; }'. + var r3b5 = b5 <= a5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Derived): void; }' and '{ fn(a: Base): void; }'. + var r3b6 = b6 <= a6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Base, b: Derived): void; }' and '{ fn(a: Derived, b: Base): void; }'. + var r3b7 = b7 <= a7; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): void; }'. + var r3b8 = b8 <= a8; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. + var r3b9 = b9 <= a9; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Derived; }' and '{ fn(): Base; }'. + var r3b10 = b10 <= a10; + ~~~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: Derived): void; }' and '{ fn(a?: Base): void; }'. + var r3b11 = b11 <= a11; + ~~~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Derived[]): void; }' and '{ fn(...a: Base[]): void; }'. + //var r3b12 = b12 <= a12; + + // operator >= + var r4a1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. + var r4a2 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. + var r4a3 = a3 >= b3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number): void; }'. + var r4a4 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(): void; }'. + var r4a5 = a5 >= b5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Base): void; }' and '{ fn(a: Derived): void; }'. + var r4a6 = a6 >= b6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: Derived): void; }'. + var r4a7 = a7 >= b7; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): void; }' and '{ fn(): Base; }'. + var r4a8 = a8 >= b8; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. + var r4a9 = a9 >= b9; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Derived; }'. + var r4a10 = a10 >= b10; + ~~~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: Derived): void; }'. + var r4a11 = a11 >= b11; + ~~~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: Derived[]): void; }'. + //var r4a12 = a12 >= b12; + + var r4b1 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): void; }' and '{ fn(): void; }'. + var r4b2 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: number, b: string): void; }'. + var r4b3 = b3 >= a3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number): void; }' and '{ fn(a: number, b: string): void; }'. + var r4b4 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): void; }' and '{ fn(a: number, b: string): void; }'. + var r4b5 = b5 >= a5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Derived): void; }' and '{ fn(a: Base): void; }'. + var r4b6 = b6 >= a6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Base, b: Derived): void; }' and '{ fn(a: Derived, b: Base): void; }'. + var r4b7 = b7 >= a7; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): void; }'. + var r4b8 = b8 >= a8; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): Base; }'. + var r4b9 = b9 >= a9; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Derived; }' and '{ fn(): Base; }'. + var r4b10 = b10 >= a10; + ~~~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: Derived): void; }' and '{ fn(a?: Base): void; }'. + var r4b11 = b11 >= a11; + ~~~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Derived[]): void; }' and '{ fn(...a: Base[]): void; }'. + //var r4b12 = b12 >= a12; + + // operator == + var r5a1 = a1 == b1; + var r5a2 = a2 == b2; + var r5a3 = a3 == b3; + var r5a4 = a4 == b4; + var r5a5 = a5 == b5; + var r5a6 = a6 == b6; + var r5a7 = a7 == b7; + var r5a8 = a8 == b8; + var r5a9 = a9 == b9; + var r5a10 = a10 == b10; + var r5a11 = a11 == b11; + //var r5a12 = a12 == b12; + + var r5b1 = b1 == a1; + var r5b2 = b2 == a2; + var r5b3 = b3 == a3; + var r5b4 = b4 == a4; + var r5b5 = b5 == a5; + var r5b6 = b6 == a6; + var r5b7 = b7 == a7; + var r5b8 = b8 == a8; + var r5b9 = b9 == a9; + var r5b10 = b10 == a10; + var r5b11 = b11 == a11; + //var r5b12 = b12 == a12; + + // operator != + var r6a1 = a1 != b1; + var r6a2 = a2 != b2; + var r6a3 = a3 != b3; + var r6a4 = a4 != b4; + var r6a5 = a5 != b5; + var r6a6 = a6 != b6; + var r6a7 = a7 != b7; + var r6a8 = a8 != b8; + var r6a9 = a9 != b9; + var r6a10 = a10 != b10; + var r6a11 = a11 != b11; + //var r6a12 = a12 != b12; + + var r6b1 = b1 != a1; + var r6b2 = b2 != a2; + var r6b3 = b3 != a3; + var r6b4 = b4 != a4; + var r6b5 = b5 != a5; + var r6b6 = b6 != a6; + var r6b7 = b7 != a7; + var r6b8 = b8 != a8; + var r6b9 = b9 != a9; + var r6b10 = b10 != a10; + var r6b11 = b11 != a11; + //var r6b12 = b12 != a12; + + // operator === + var r7a1 = a1 === b1; + var r7a2 = a2 === b2; + var r7a3 = a3 === b3; + var r7a4 = a4 === b4; + var r7a5 = a5 === b5; + var r7a6 = a6 === b6; + var r7a7 = a7 === b7; + var r7a8 = a8 === b8; + var r7a9 = a9 === b9; + var r7a10 = a10 === b10; + var r7a11 = a11 === b11; + //var r7a12 = a12 === b12; + + var r7b1 = b1 === a1; + var r7b2 = b2 === a2; + var r7b3 = b3 === a3; + var r7b4 = b4 === a4; + var r7b5 = b5 === a5; + var r7b6 = b6 === a6; + var r7b7 = b7 === a7; + var r7b8 = b8 === a8; + var r7b9 = b9 === a9; + var r7b10 = b10 === a10; + var r7b11 = b11 === a11; + //var r7b12 = b12 === a12; + + // operator !== + var r8a1 = a1 !== b1; + var r8a2 = a2 !== b2; + var r8a3 = a3 !== b3; + var r8a4 = a4 !== b4; + var r8a5 = a5 !== b5; + var r8a6 = a6 !== b6; + var r8a7 = a7 !== b7; + var r8a8 = a8 !== b8; + var r8a9 = a9 !== b9; + var r8a10 = a10 !== b10; + var r8a11 = a11 !== b11; + //var r8a12 = a12 !== b12; + + var r8b1 = b1 !== a1; + var r8b2 = b2 !== a2; + var r8b3 = b3 !== a3; + var r8b4 = b4 !== a4; + var r8b5 = b5 !== a5; + var r8b6 = b6 !== a6; + var r8b7 = b7 !== a7; + var r8b8 = b8 !== a8; + var r8b9 = b9 !== a9; + var r8b10 = b10 !== a10; + var r8b11 = b11 !== a11; + //var r8b12 = b12 !== a12; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.errors.txt new file mode 100644 index 0000000000000..31bdb85488c46 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.errors.txt @@ -0,0 +1,440 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(41,12): error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(42,12): error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types 'new (a: Base) => Base' and 'new (a: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(45,12): error TS2365: Operator '<' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(46,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => Derived'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(47,12): error TS2365: Operator '<' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(48,12): error TS2365: Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: Derived[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(51,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(52,12): error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(53,12): error TS2365: Operator '<' cannot be applied to types 'new (a: number) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(54,12): error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(55,12): error TS2365: Operator '<' cannot be applied to types 'new (a: Derived) => Base' and 'new (a: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(56,12): error TS2365: Operator '<' cannot be applied to types 'new (a: Base, b: Derived) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(57,12): error TS2365: Operator '<' cannot be applied to types 'new () => Derived' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(58,12): error TS2365: Operator '<' cannot be applied to types 'new (a?: Derived) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(59,12): error TS2365: Operator '<' cannot be applied to types 'new (...a: Derived[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(63,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(64,12): error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(65,12): error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(66,12): error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(67,12): error TS2365: Operator '>' cannot be applied to types 'new (a: Base) => Base' and 'new (a: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(68,12): error TS2365: Operator '>' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(69,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => Derived'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(70,12): error TS2365: Operator '>' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(71,12): error TS2365: Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: Derived[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(74,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(75,12): error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(76,12): error TS2365: Operator '>' cannot be applied to types 'new (a: number) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(77,12): error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(78,12): error TS2365: Operator '>' cannot be applied to types 'new (a: Derived) => Base' and 'new (a: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(79,12): error TS2365: Operator '>' cannot be applied to types 'new (a: Base, b: Derived) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(80,12): error TS2365: Operator '>' cannot be applied to types 'new () => Derived' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(81,12): error TS2365: Operator '>' cannot be applied to types 'new (a?: Derived) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(82,12): error TS2365: Operator '>' cannot be applied to types 'new (...a: Derived[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(86,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(87,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(88,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(89,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(90,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: Base) => Base' and 'new (a: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(91,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(92,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => Derived'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(93,12): error TS2365: Operator '<=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(94,12): error TS2365: Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: Derived[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(97,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(98,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(99,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: number) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(100,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(101,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: Derived) => Base' and 'new (a: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(102,12): error TS2365: Operator '<=' cannot be applied to types 'new (a: Base, b: Derived) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(103,12): error TS2365: Operator '<=' cannot be applied to types 'new () => Derived' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(104,12): error TS2365: Operator '<=' cannot be applied to types 'new (a?: Derived) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(105,12): error TS2365: Operator '<=' cannot be applied to types 'new (...a: Derived[]) => Base' and 'new (...a: Base[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(109,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(110,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(111,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(112,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(113,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: Base) => Base' and 'new (a: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(114,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(115,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => Derived'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(116,12): error TS2365: Operator '>=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: Derived) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(117,12): error TS2365: Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: Derived[]) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(120,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(121,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(122,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: number) => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(123,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new (a: number, b: string) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(124,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: Derived) => Base' and 'new (a: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(125,12): error TS2365: Operator '>=' cannot be applied to types 'new (a: Base, b: Derived) => Base' and 'new (a: Derived, b: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(126,12): error TS2365: Operator '>=' cannot be applied to types 'new () => Derived' and 'new () => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(127,12): error TS2365: Operator '>=' cannot be applied to types 'new (a?: Derived) => Base' and 'new (a?: Base) => Base'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts(128,12): error TS2365: Operator '>=' cannot be applied to types 'new (...a: Derived[]) => Base' and 'new (...a: Base[]) => Base'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts (72 errors) ==== + class Base { + public a: string; + } + + class Derived extends Base { + public b: string; + } + + var a1: { new (): Base }; + var b1: { new (): Base }; + + var a2: { new (a: number, b: string): Base }; + var b2: { new (a: number, b: string): Base }; + + var a3: { new (a: number, b: string): Base }; + var b3: { new (a: number): Base }; + + var a4: { new (a: number, b: string): Base }; + var b4: { new (): Base }; + + var a5: { new (a: Base): Base }; + var b5: { new (a: Derived): Base }; + + var a6: { new (a: Derived, b: Base): Base }; + var b6: { new (a: Base, b: Derived): Base }; + + var a7: { new (): Base }; + var b7: { new (): Derived }; + + var a8: { new (a?: Base): Base }; + var b8: { new (a?: Derived): Base }; + + var a9: { new (...a: Base[]): Base }; + var b9: { new (...a: Derived[]): Base }; + + //var a10: { (t: T, u: U): T[] }; + //var b10: { (a: A, b: B): A[] }; + + // operator < + var r1a1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => Base'. + var r1a2 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. + var r1a3 = a3 < b3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number) => Base'. + var r1a4 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new () => Base'. + var r1a5 = a5 < b5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: Base) => Base' and 'new (a: Derived) => Base'. + var r1a6 = a6 < b6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: Derived) => Base'. + var r1a7 = a7 < b7; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => Derived'. + var r1a8 = a8 < b8; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: Derived) => Base'. + var r1a9 = a9 < b9; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: Derived[]) => Base'. + //var r1a10 = a10 < b10; + + var r1b1 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => Base'. + var r1b2 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. + var r1b3 = b3 < a3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: number) => Base' and 'new (a: number, b: string) => Base'. + var r1b4 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new (a: number, b: string) => Base'. + var r1b5 = b5 < a5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: Derived) => Base' and 'new (a: Base) => Base'. + var r1b6 = b6 < a6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: Base, b: Derived) => Base' and 'new (a: Derived, b: Base) => Base'. + var r1b7 = b7 < a7; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Derived' and 'new () => Base'. + var r1b8 = b8 < a8; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (a?: Derived) => Base' and 'new (a?: Base) => Base'. + var r1b9 = b9 < a9; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (...a: Derived[]) => Base' and 'new (...a: Base[]) => Base'. + //var r1b10 = b10 < a10; + + // operator > + var r2a1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => Base'. + var r2a2 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. + var r2a3 = a3 > b3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number) => Base'. + var r2a4 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new () => Base'. + var r2a5 = a5 > b5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: Base) => Base' and 'new (a: Derived) => Base'. + var r2a6 = a6 > b6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: Derived) => Base'. + var r2a7 = a7 > b7; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => Derived'. + var r2a8 = a8 > b8; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: Derived) => Base'. + var r2a9 = a9 > b9; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: Derived[]) => Base'. + //var r2a10 = a10 > b10; + + var r2b1 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => Base'. + var r2b2 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. + var r2b3 = b3 > a3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: number) => Base' and 'new (a: number, b: string) => Base'. + var r2b4 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new (a: number, b: string) => Base'. + var r2b5 = b5 > a5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: Derived) => Base' and 'new (a: Base) => Base'. + var r2b6 = b6 > a6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: Base, b: Derived) => Base' and 'new (a: Derived, b: Base) => Base'. + var r2b7 = b7 > a7; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Derived' and 'new () => Base'. + var r2b8 = b8 > a8; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (a?: Derived) => Base' and 'new (a?: Base) => Base'. + var r2b9 = b9 > a9; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (...a: Derived[]) => Base' and 'new (...a: Base[]) => Base'. + //var r2b10 = b10 > a10; + + // operator <= + var r3a1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => Base'. + var r3a2 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. + var r3a3 = a3 <= b3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number) => Base'. + var r3a4 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new () => Base'. + var r3a5 = a5 <= b5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: Base) => Base' and 'new (a: Derived) => Base'. + var r3a6 = a6 <= b6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: Derived) => Base'. + var r3a7 = a7 <= b7; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => Derived'. + var r3a8 = a8 <= b8; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: Derived) => Base'. + var r3a9 = a9 <= b9; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: Derived[]) => Base'. + //var r3a10 = a10 <= b10; + + var r3b1 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => Base'. + var r3b2 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. + var r3b3 = b3 <= a3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: number) => Base' and 'new (a: number, b: string) => Base'. + var r3b4 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new (a: number, b: string) => Base'. + var r3b5 = b5 <= a5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: Derived) => Base' and 'new (a: Base) => Base'. + var r3b6 = b6 <= a6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: Base, b: Derived) => Base' and 'new (a: Derived, b: Base) => Base'. + var r3b7 = b7 <= a7; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Derived' and 'new () => Base'. + var r3b8 = b8 <= a8; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a?: Derived) => Base' and 'new (a?: Base) => Base'. + var r3b9 = b9 <= a9; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...a: Derived[]) => Base' and 'new (...a: Base[]) => Base'. + //var r3b10 = b10 <= a10; + + // operator >= + var r4a1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => Base'. + var r4a2 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. + var r4a3 = a3 >= b3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number) => Base'. + var r4a4 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new () => Base'. + var r4a5 = a5 >= b5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: Base) => Base' and 'new (a: Derived) => Base'. + var r4a6 = a6 >= b6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: Derived) => Base'. + var r4a7 = a7 >= b7; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => Derived'. + var r4a8 = a8 >= b8; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: Derived) => Base'. + var r4a9 = a9 >= b9; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: Derived[]) => Base'. + //var r4a10 = a10 >= b10; + + var r4b1 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => Base'. + var r4b2 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: number, b: string) => Base'. + var r4b3 = b3 >= a3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: number) => Base' and 'new (a: number, b: string) => Base'. + var r4b4 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new (a: number, b: string) => Base'. + var r4b5 = b5 >= a5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: Derived) => Base' and 'new (a: Base) => Base'. + var r4b6 = b6 >= a6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: Base, b: Derived) => Base' and 'new (a: Derived, b: Base) => Base'. + var r4b7 = b7 >= a7; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Derived' and 'new () => Base'. + var r4b8 = b8 >= a8; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a?: Derived) => Base' and 'new (a?: Base) => Base'. + var r4b9 = b9 >= a9; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...a: Derived[]) => Base' and 'new (...a: Base[]) => Base'. + //var r4b10 = b10 >= a10; + + // operator == + var r5a1 = a1 == b1; + var r5a2 = a2 == b2; + var r5a3 = a3 == b3; + var r5a4 = a4 == b4; + var r5a5 = a5 == b5; + var r5a6 = a6 == b6; + var r5a7 = a7 == b7; + var r5a8 = a8 == b8; + var r5a9 = a9 == b9; + //var r5a10 = a10 == b10; + + var r5b1 = b1 == a1; + var r5b2 = b2 == a2; + var r5b3 = b3 == a3; + var r5b4 = b4 == a4; + var r5b5 = b5 == a5; + var r5b6 = b6 == a6; + var r5b7 = b7 == a7; + var r5b8 = b8 == a8; + var r5b9 = b9 == a9; + //var r5b10 = b10 == a10; + + // operator != + var r6a1 = a1 != b1; + var r6a2 = a2 != b2; + var r6a3 = a3 != b3; + var r6a4 = a4 != b4; + var r6a5 = a5 != b5; + var r6a6 = a6 != b6; + var r6a7 = a7 != b7; + var r6a8 = a8 != b8; + var r6a9 = a9 != b9; + //var r6a10 = a10 != b10; + + var r6b1 = b1 != a1; + var r6b2 = b2 != a2; + var r6b3 = b3 != a3; + var r6b4 = b4 != a4; + var r6b5 = b5 != a5; + var r6b6 = b6 != a6; + var r6b7 = b7 != a7; + var r6b8 = b8 != a8; + var r6b9 = b9 != a9; + //var r6b10 = b10 != a10; + + // operator === + var r7a1 = a1 === b1; + var r7a2 = a2 === b2; + var r7a3 = a3 === b3; + var r7a4 = a4 === b4; + var r7a5 = a5 === b5; + var r7a6 = a6 === b6; + var r7a7 = a7 === b7; + var r7a8 = a8 === b8; + var r7a9 = a9 === b9; + //var r7a10 = a10 === b10; + + var r7b1 = b1 === a1; + var r7b2 = b2 === a2; + var r7b3 = b3 === a3; + var r7b4 = b4 === a4; + var r7b5 = b5 === a5; + var r7b6 = b6 === a6; + var r7b7 = b7 === a7; + var r7b8 = b8 === a8; + var r7b9 = b9 === a9; + //var r7b10 = b10 === a10; + + // operator !== + var r8a1 = a1 !== b1; + var r8a2 = a2 !== b2; + var r8a3 = a3 !== b3; + var r8a4 = a4 !== b4; + var r8a5 = a5 !== b5; + var r8a6 = a6 !== b6; + var r8a7 = a7 !== b7; + var r8a8 = a8 !== b8; + var r8a9 = a9 !== b9; + //var r8a10 = a10 !== b10; + + var r8b1 = b1 !== a1; + var r8b2 = b2 !== a2; + var r8b3 = b3 !== a3; + var r8b4 = b4 !== a4; + var r8b5 = b5 !== a5; + var r8b6 = b6 !== a6; + var r8b7 = b7 !== a7; + var r8b8 = b8 !== a8; + var r8b9 = b9 !== a9; + //var r8b10 = b10 !== a10; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.errors.txt new file mode 100644 index 0000000000000..f6d1fa015a2b6 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.errors.txt @@ -0,0 +1,206 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(22,12): error TS2365: Operator '<' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(23,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(24,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(25,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: string]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(27,12): error TS2365: Operator '<' cannot be applied to types '{ [b: string]: string; }' and '{ [a: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(28,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(29,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(30,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(33,12): error TS2365: Operator '>' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(34,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(35,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(36,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: string]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(38,12): error TS2365: Operator '>' cannot be applied to types '{ [b: string]: string; }' and '{ [a: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(39,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(40,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(41,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(44,12): error TS2365: Operator '<=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(45,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(46,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(47,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: string]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(49,12): error TS2365: Operator '<=' cannot be applied to types '{ [b: string]: string; }' and '{ [a: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(50,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(51,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(52,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: number]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(55,12): error TS2365: Operator '>=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(56,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(57,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(58,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: string]: Derived; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(60,12): error TS2365: Operator '>=' cannot be applied to types '{ [b: string]: string; }' and '{ [a: string]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(61,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: string]: Base; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(62,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts(63,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: number]: Base; }'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts (32 errors) ==== + class Base { + public a: string; + } + + class Derived extends Base { + public b: string; + } + + var a1: { [a: string]: string }; + var b1: { [b: string]: string }; + + var a2: { [index: string]: Base }; + var b2: { [index: string]: Derived }; + + var a3: { [index: number]: string }; + var b3: { [index: number]: string }; + + var a4: { [index: number]: Base }; + var b4: { [index: string]: Derived }; + + // operator < + var r1a1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: string; }'. + var r1a1 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: Derived; }'. + var r1a1 = a3 < b3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. + var r1a1 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: string]: Derived; }'. + + var r1b1 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [b: string]: string; }' and '{ [a: string]: string; }'. + var r1b1 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: string]: Base; }'. + var r1b1 = b3 < a3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. + var r1b1 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: number]: Base; }'. + + // operator > + var r2a1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: string; }'. + var r2a1 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: Derived; }'. + var r2a1 = a3 > b3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. + var r2a1 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: string]: Derived; }'. + + var r2b1 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [b: string]: string; }' and '{ [a: string]: string; }'. + var r2b1 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: string]: Base; }'. + var r2b1 = b3 > a3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. + var r2b1 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: number]: Base; }'. + + // operator <= + var r3a1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: string; }'. + var r3a1 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: Derived; }'. + var r3a1 = a3 <= b3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. + var r3a1 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: string]: Derived; }'. + + var r3b1 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [b: string]: string; }' and '{ [a: string]: string; }'. + var r3b1 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: string]: Base; }'. + var r3b1 = b3 <= a3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. + var r3b1 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: number]: Base; }'. + + // operator >= + var r4a1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: string; }'. + var r4a1 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: Derived; }'. + var r4a1 = a3 >= b3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. + var r4a1 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: string]: Derived; }'. + + var r4b1 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [b: string]: string; }' and '{ [a: string]: string; }'. + var r4b1 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: string]: Base; }'. + var r4b1 = b3 >= a3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: string; }' and '{ [index: number]: string; }'. + var r4b1 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Derived; }' and '{ [index: number]: Base; }'. + + // operator == + var r5a1 = a1 == b1; + var r5a1 = a2 == b2; + var r5a1 = a3 == b3; + var r5a1 = a4 == b4; + + var r5b1 = b1 == a1; + var r5b1 = b2 == a2; + var r5b1 = b3 == a3; + var r5b1 = b4 == a4; + + // operator != + var r6a1 = a1 != b1; + var r6a1 = a2 != b2; + var r6a1 = a3 != b3; + var r6a1 = a4 != b4; + + var r6b1 = b1 != a1; + var r6b1 = b2 != a2; + var r6b1 = b3 != a3; + var r6b1 = b4 != a4; + + // operator === + var r7a1 = a1 === b1; + var r7a1 = a2 === b2; + var r7a1 = a3 === b3; + var r7a1 = a4 === b4; + + var r7b1 = b1 === a1; + var r7b1 = b2 === a2; + var r7b1 = b3 === a3; + var r7b1 = b4 === a4; + + // operator !== + var r8a1 = a1 !== b1; + var r8a1 = a2 !== b2; + var r8a1 = a3 !== b3; + var r8a1 = a4 !== b4; + + var r8b1 = b1 !== a1; + var r8b1 = b2 !== a2; + var r8b1 = b3 !== a3; + var r8b1 = b4 !== a4; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt new file mode 100644 index 0000000000000..408955e1c8073 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt @@ -0,0 +1,311 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(31,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(33,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(34,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(35,12): error TS2365: Operator '<' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(36,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): {}; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(39,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: string): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(41,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: U): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(42,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x?: string): string; }' and '{ fn(x?: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types '{ fn(...x: string[]): string; }' and '{ fn(...x: T[]): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): {}; }' and '{ fn(x: T, y: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(48,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(49,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(50,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(51,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(52,12): error TS2365: Operator '>' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(53,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): {}; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(56,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: string): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(58,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: U): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(59,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x?: string): string; }' and '{ fn(x?: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(60,12): error TS2365: Operator '>' cannot be applied to types '{ fn(...x: string[]): string; }' and '{ fn(...x: T[]): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(61,12): error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): {}; }' and '{ fn(x: T, y: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(65,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(66,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(67,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(68,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(69,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(70,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): {}; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(73,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(75,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: U): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(76,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x?: string): string; }' and '{ fn(x?: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(77,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(...x: string[]): string; }' and '{ fn(...x: T[]): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(78,12): error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): {}; }' and '{ fn(x: T, y: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(82,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(83,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(84,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: string, y: number): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(85,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(86,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): string; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(87,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): {}; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(90,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(91,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(92,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: U): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(93,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x?: string): string; }' and '{ fn(x?: T): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(94,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(...x: string[]): string; }' and '{ fn(...x: T[]): T; }'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts(95,12): error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): {}; }' and '{ fn(x: T, y: T): T; }'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts (48 errors) ==== + class Base { + public a: string; + } + + class Derived extends Base { + public b: string; + } + + var a1: { fn(x: T): T }; + var b1: { fn(x: string): string }; + + var a2: { fn(x: T): T }; + var b2: { fn(x: string, y: number): string }; + + var a3: { fn(x: T, y: U): T }; + var b3: { fn(x: string, y: number): string }; + + var a4: { fn(x?: T): T }; + var b4: { fn(x?: string): string }; + + var a5: { fn(...x: T[]): T }; + var b5: { fn(...x: string[]): string }; + + var a6: { fn(x: T, y: T): T }; + var b6: { fn(x: string, y: number): {} }; + + //var a7: { fn(x: T, y: U): T }; + var b7: { fn(x: Base, y: Derived): Base }; + + // operator < + var r1a1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): string; }'. + var r1a2 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. + var r1a3 = a3 < b3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: string, y: number): string; }'. + var r1a4 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): string; }'. + var r1a5 = a5 < b5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): string; }'. + var r1a6 = a6 < b6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): {}; }'. + //var r1a7 = a7 < b7; + + var r1b1 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: string): string; }' and '{ fn(x: T): T; }'. + var r1b2 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. + var r1b3 = b3 < a3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: U): T; }'. + var r1b4 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x?: string): string; }' and '{ fn(x?: T): T; }'. + var r1b5 = b5 < a5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...x: string[]): string; }' and '{ fn(...x: T[]): T; }'. + var r1b6 = b6 < a6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): {}; }' and '{ fn(x: T, y: T): T; }'. + //var r1b7 = b7 < a7; + + // operator > + var r2a1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): string; }'. + var r2a2 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. + var r2a3 = a3 > b3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: string, y: number): string; }'. + var r2a4 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): string; }'. + var r2a5 = a5 > b5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): string; }'. + var r2a6 = a6 > b6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): {}; }'. + //var r2a7 = a7 > b7; + + var r2b1 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: string): string; }' and '{ fn(x: T): T; }'. + var r2b2 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. + var r2b3 = b3 > a3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: U): T; }'. + var r2b4 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x?: string): string; }' and '{ fn(x?: T): T; }'. + var r2b5 = b5 > a5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...x: string[]): string; }' and '{ fn(...x: T[]): T; }'. + var r2b6 = b6 > a6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): {}; }' and '{ fn(x: T, y: T): T; }'. + //var r2b7 = b7 > a7; + + // operator <= + var r3a1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): string; }'. + var r3a2 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. + var r3a3 = a3 <= b3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: string, y: number): string; }'. + var r3a4 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): string; }'. + var r3a5 = a5 <= b5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): string; }'. + var r3a6 = a6 <= b6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): {}; }'. + //var r3a7 = a7 <= b7; + + var r3b1 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string): string; }' and '{ fn(x: T): T; }'. + var r3b2 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. + var r3b3 = b3 <= a3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: U): T; }'. + var r3b4 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x?: string): string; }' and '{ fn(x?: T): T; }'. + var r3b5 = b5 <= a5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...x: string[]): string; }' and '{ fn(...x: T[]): T; }'. + var r3b6 = b6 <= a6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): {}; }' and '{ fn(x: T, y: T): T; }'. + //var r3b7 = b7 <= a7; + + // operator >= + var r4a1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string): string; }'. + var r4a2 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. + var r4a3 = a3 >= b3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T, y: U): T; }' and '{ fn(x: string, y: number): string; }'. + var r4a4 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x?: T): T; }' and '{ fn(x?: string): string; }'. + var r4a5 = a5 >= b5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...x: T[]): T; }' and '{ fn(...x: string[]): string; }'. + var r4a6 = a6 >= b6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T, y: T): T; }' and '{ fn(x: string, y: number): {}; }'. + //var r4a7 = a7 >= b7; + + var r4b1 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string): string; }' and '{ fn(x: T): T; }'. + var r4b2 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. + var r4b3 = b3 >= a3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T, y: U): T; }'. + var r4b4 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x?: string): string; }' and '{ fn(x?: T): T; }'. + var r4b5 = b5 >= a5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...x: string[]): string; }' and '{ fn(...x: T[]): T; }'. + var r4b6 = b6 >= a6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): {}; }' and '{ fn(x: T, y: T): T; }'. + //var r4b7 = b7 >= a7; + + // operator == + var r5a1 = a1 == b1; + var r5a2 = a2 == b2; + var r5a3 = a3 == b3; + var r5a4 = a4 == b4; + var r5a5 = a5 == b5; + var r5a6 = a6 == b6; + //var r5a7 = a7 == b7; + + var r5b1 = b1 == a1; + var r5b2 = b2 == a2; + var r5b3 = b3 == a3; + var r5b4 = b4 == a4; + var r5b5 = b5 == a5; + var r5b6 = b6 == a6; + //var r5b7 = b7 == a7; + + // operator != + var r6a1 = a1 != b1; + var r6a2 = a2 != b2; + var r6a3 = a3 != b3; + var r6a4 = a4 != b4; + var r6a5 = a5 != b5; + var r6a6 = a6 != b6; + //var r6a7 = a7 != b7; + + var r6b1 = b1 != a1; + var r6b2 = b2 != a2; + var r6b3 = b3 != a3; + var r6b4 = b4 != a4; + var r6b5 = b5 != a5; + var r6b6 = b6 != a6; + //var r6b7 = b7 != a7; + + // operator === + var r7a1 = a1 === b1; + var r7a2 = a2 === b2; + var r7a3 = a3 === b3; + var r7a4 = a4 === b4; + var r7a5 = a5 === b5; + var r7a6 = a6 === b6; + //var r7a7 = a7 === b7; + + var r7b1 = b1 === a1; + var r7b2 = b2 === a2; + var r7b3 = b3 === a3; + var r7b4 = b4 === a4; + var r7b5 = b5 === a5; + var r7b6 = b6 === a6; + //var r7b7 = b7 === a7; + + // operator !== + var r8a1 = a1 !== b1; + var r8a2 = a2 !== b2; + var r8a3 = a3 !== b3; + var r8a4 = a4 !== b4; + var r8a5 = a5 !== b5; + var r8a6 = a6 !== b6; + //var r8a7 = a7 !== b7; + + var r8b1 = b1 !== a1; + var r8b2 = b2 !== a2; + var r8b3 = b3 !== a3; + var r8b4 = b4 !== a4; + var r8b5 = b5 !== a5; + var r8b6 = b6 !== a6; + //var r8b7 = b7 !== a7; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt new file mode 100644 index 0000000000000..9b09358299da6 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt @@ -0,0 +1,311 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(31,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(33,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(34,12): error TS2365: Operator '<' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(35,12): error TS2365: Operator '<' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(36,12): error TS2365: Operator '<' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => {}'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(39,12): error TS2365: Operator '<' cannot be applied to types 'new (x: string) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(40,12): error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(41,12): error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: U) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(42,12): error TS2365: Operator '<' cannot be applied to types 'new (x?: string) => string' and 'new (x?: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(43,12): error TS2365: Operator '<' cannot be applied to types 'new (...x: string[]) => string' and 'new (...x: T[]) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(44,12): error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => {}' and 'new (x: T, y: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(48,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(49,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(50,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(51,12): error TS2365: Operator '>' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(52,12): error TS2365: Operator '>' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(53,12): error TS2365: Operator '>' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => {}'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(56,12): error TS2365: Operator '>' cannot be applied to types 'new (x: string) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(57,12): error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(58,12): error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: U) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(59,12): error TS2365: Operator '>' cannot be applied to types 'new (x?: string) => string' and 'new (x?: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(60,12): error TS2365: Operator '>' cannot be applied to types 'new (...x: string[]) => string' and 'new (...x: T[]) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(61,12): error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => {}' and 'new (x: T, y: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(65,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(66,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(67,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(68,12): error TS2365: Operator '<=' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(69,12): error TS2365: Operator '<=' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(70,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => {}'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(73,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: string) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(74,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(75,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: U) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(76,12): error TS2365: Operator '<=' cannot be applied to types 'new (x?: string) => string' and 'new (x?: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(77,12): error TS2365: Operator '<=' cannot be applied to types 'new (...x: string[]) => string' and 'new (...x: T[]) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(78,12): error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => {}' and 'new (x: T, y: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(82,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(83,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(84,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: string, y: number) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(85,12): error TS2365: Operator '>=' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(86,12): error TS2365: Operator '>=' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => string'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(87,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => {}'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(90,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: string) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(91,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(92,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: U) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(93,12): error TS2365: Operator '>=' cannot be applied to types 'new (x?: string) => string' and 'new (x?: T) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(94,12): error TS2365: Operator '>=' cannot be applied to types 'new (...x: string[]) => string' and 'new (...x: T[]) => T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts(95,12): error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => {}' and 'new (x: T, y: T) => T'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts (48 errors) ==== + class Base { + public a: string; + } + + class Derived extends Base { + public b: string; + } + + var a1: { new (x: T): T }; + var b1: { new (x: string): string }; + + var a2: { new (x: T): T }; + var b2: { new (x: string, y: number): string }; + + var a3: { new (x: T, y: U): T }; + var b3: { new (x: string, y: number): string }; + + var a4: { new (x?: T): T }; + var b4: { new (x?: string): string }; + + var a5: { new (...x: T[]): T }; + var b5: { new (...x: string[]): string }; + + var a6: { new (x: T, y: T): T }; + var b6: { new (x: string, y: number): {} }; + + //var a7: { new (x: T, y: U): T }; + var b7: { new (x: Base, y: Derived): Base }; + + // operator < + var r1a1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => string'. + var r1a2 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. + var r1a3 = a3 < b3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: string, y: number) => string'. + var r1a4 = a4 < b4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => string'. + var r1a5 = a5 < b5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => string'. + var r1a6 = a6 < b6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => {}'. + //var r1a7 = a7 < b7; + + var r1b1 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: string) => string' and 'new (x: T) => T'. + var r1b2 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. + var r1b3 = b3 < a3; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: U) => T'. + var r1b4 = b4 < a4; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x?: string) => string' and 'new (x?: T) => T'. + var r1b5 = b5 < a5; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (...x: string[]) => string' and 'new (...x: T[]) => T'. + var r1b6 = b6 < a6; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => {}' and 'new (x: T, y: T) => T'. + //var r1b7 = b7 < a7; + + // operator > + var r2a1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => string'. + var r2a2 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. + var r2a3 = a3 > b3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: string, y: number) => string'. + var r2a4 = a4 > b4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => string'. + var r2a5 = a5 > b5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => string'. + var r2a6 = a6 > b6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => {}'. + //var r2a7 = a7 > b7; + + var r2b1 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: string) => string' and 'new (x: T) => T'. + var r2b2 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. + var r2b3 = b3 > a3; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: U) => T'. + var r2b4 = b4 > a4; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x?: string) => string' and 'new (x?: T) => T'. + var r2b5 = b5 > a5; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (...x: string[]) => string' and 'new (...x: T[]) => T'. + var r2b6 = b6 > a6; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => {}' and 'new (x: T, y: T) => T'. + //var r2b7 = b7 > a7; + + // operator <= + var r3a1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => string'. + var r3a2 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. + var r3a3 = a3 <= b3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: string, y: number) => string'. + var r3a4 = a4 <= b4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => string'. + var r3a5 = a5 <= b5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => string'. + var r3a6 = a6 <= b6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => {}'. + //var r3a7 = a7 <= b7; + + var r3b1 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: string) => string' and 'new (x: T) => T'. + var r3b2 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. + var r3b3 = b3 <= a3; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: U) => T'. + var r3b4 = b4 <= a4; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x?: string) => string' and 'new (x?: T) => T'. + var r3b5 = b5 <= a5; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...x: string[]) => string' and 'new (...x: T[]) => T'. + var r3b6 = b6 <= a6; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => {}' and 'new (x: T, y: T) => T'. + //var r3b7 = b7 <= a7; + + // operator >= + var r4a1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string) => string'. + var r4a2 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. + var r4a3 = a3 >= b3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T, y: U) => T' and 'new (x: string, y: number) => string'. + var r4a4 = a4 >= b4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x?: T) => T' and 'new (x?: string) => string'. + var r4a5 = a5 >= b5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...x: T[]) => T' and 'new (...x: string[]) => string'. + var r4a6 = a6 >= b6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T, y: T) => T' and 'new (x: string, y: number) => {}'. + //var r4a7 = a7 >= b7; + + var r4b1 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: string) => string' and 'new (x: T) => T'. + var r4b2 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. + var r4b3 = b3 >= a3; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T, y: U) => T'. + var r4b4 = b4 >= a4; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x?: string) => string' and 'new (x?: T) => T'. + var r4b5 = b5 >= a5; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...x: string[]) => string' and 'new (...x: T[]) => T'. + var r4b6 = b6 >= a6; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => {}' and 'new (x: T, y: T) => T'. + //var r4b7 = b7 >= a7; + + // operator == + var r5a1 = a1 == b1; + var r5a2 = a2 == b2; + var r5a3 = a3 == b3; + var r5a4 = a4 == b4; + var r5a5 = a5 == b5; + var r5a6 = a6 == b6; + //var r5a7 = a7 == b7; + + var r5b1 = b1 == a1; + var r5b2 = b2 == a2; + var r5b3 = b3 == a3; + var r5b4 = b4 == a4; + var r5b5 = b5 == a5; + var r5b6 = b6 == a6; + //var r5b7 = b7 == a7; + + // operator != + var r6a1 = a1 != b1; + var r6a2 = a2 != b2; + var r6a3 = a3 != b3; + var r6a4 = a4 != b4; + var r6a5 = a5 != b5; + var r6a6 = a6 != b6; + //var r6a7 = a7 != b7; + + var r6b1 = b1 != a1; + var r6b2 = b2 != a2; + var r6b3 = b3 != a3; + var r6b4 = b4 != a4; + var r6b5 = b5 != a5; + var r6b6 = b6 != a6; + //var r6b7 = b7 != a7; + + // operator === + var r7a1 = a1 === b1; + var r7a2 = a2 === b2; + var r7a3 = a3 === b3; + var r7a4 = a4 === b4; + var r7a5 = a5 === b5; + var r7a6 = a6 === b6; + //var r7a7 = a7 === b7; + + var r7b1 = b1 === a1; + var r7b2 = b2 === a2; + var r7b3 = b3 === a3; + var r7b4 = b4 === a4; + var r7b5 = b5 === a5; + var r7b6 = b6 === a6; + //var r7b7 = b7 === a7; + + // operator !== + var r8a1 = a1 !== b1; + var r8a2 = a2 !== b2; + var r8a3 = a3 !== b3; + var r8a4 = a4 !== b4; + var r8a5 = a5 !== b5; + var r8a6 = a6 !== b6; + //var r8a7 = a7 !== b7; + + var r8b1 = b1 !== a1; + var r8b2 = b2 !== a2; + var r8b3 = b3 !== a3; + var r8b4 = b4 !== a4; + var r8b5 = b5 !== a5; + var r8b6 = b6 !== a6; + //var r8b7 = b7 !== a7; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnOptionalProperty.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnOptionalProperty.errors.txt new file mode 100644 index 0000000000000..fb67838d18b97 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnOptionalProperty.errors.txt @@ -0,0 +1,70 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(14,11): error TS2365: Operator '<' cannot be applied to types 'I' and 'J'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(15,11): error TS2365: Operator '<' cannot be applied to types 'J' and 'I'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(18,11): error TS2365: Operator '>' cannot be applied to types 'I' and 'J'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(19,11): error TS2365: Operator '>' cannot be applied to types 'J' and 'I'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(22,11): error TS2365: Operator '<=' cannot be applied to types 'I' and 'J'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(23,11): error TS2365: Operator '<=' cannot be applied to types 'J' and 'I'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(26,11): error TS2365: Operator '>=' cannot be applied to types 'I' and 'J'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(27,11): error TS2365: Operator '>=' cannot be applied to types 'J' and 'I'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts (8 errors) ==== + interface I { + a: string; + b?: number; + } + + interface J { + a: string; + } + + var a: I; + var b: J; + + // operator < + var ra1 = a < b; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'I' and 'J'. + var ra2 = b < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'J' and 'I'. + + // operator > + var rb1 = a > b; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'I' and 'J'. + var rb2 = b > a; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'J' and 'I'. + + // operator <= + var rc1 = a <= b; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'I' and 'J'. + var rc2 = b <= a; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'J' and 'I'. + + // operator >= + var rd1 = a >= b; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'I' and 'J'. + var rd2 = b >= a; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'J' and 'I'. + + // operator == + var re1 = a == b; + var re2 = b == a; + + // operator != + var rf1 = a != b; + var rf2 = b != a; + + // operator === + var rg1 = a === b; + var rg2 = b === a; + + // operator !== + var rh1 = a !== b; + var rh2 = b !== a; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.errors.txt new file mode 100644 index 0000000000000..0d92e9c455f80 --- /dev/null +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.errors.txt @@ -0,0 +1,129 @@ +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(33,11): error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(34,11): error TS2365: Operator '<' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(35,11): error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(36,11): error TS2365: Operator '<' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(39,11): error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(40,11): error TS2365: Operator '>' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(41,11): error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(42,11): error TS2365: Operator '>' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(45,11): error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(46,11): error TS2365: Operator '<=' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(47,11): error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(48,11): error TS2365: Operator '<=' cannot be applied to types 'B2' and 'A2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(51,11): error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(52,11): error TS2365: Operator '>=' cannot be applied to types 'A2' and 'B2'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(53,11): error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts(54,11): error TS2365: Operator '>=' cannot be applied to types 'B2' and 'A2'. + + +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts (16 errors) ==== + class Base { + public a: string; + } + + class Derived extends Base { + public b: string; + } + + class A1 { + public a: Base; + public b: Base; + } + + class B1 { + public a: Base; + public b: Derived; + } + + class A2 { + private a; + } + + class B2 extends A2 { + private b; + } + + var a1: A1; + var a2: A2; + var b1: B1; + var b2: B2; + + // operator < + var ra1 = a1 < b1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. + var ra2 = a2 < b2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'A2' and 'B2'. + var ra3 = b1 < a1; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. + var ra4 = b2 < a2; + ~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'B2' and 'A2'. + + // operator > + var rb1 = a1 > b1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. + var rb2 = a2 > b2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'A2' and 'B2'. + var rb3 = b1 > a1; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. + var rb4 = b2 > a2; + ~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'B2' and 'A2'. + + // operator <= + var rc1 = a1 <= b1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. + var rc2 = a2 <= b2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'A2' and 'B2'. + var rc3 = b1 <= a1; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. + var rc4 = b2 <= a2; + ~~~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'B2' and 'A2'. + + // operator >= + var rd1 = a1 >= b1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. + var rd2 = a2 >= b2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'A2' and 'B2'. + var rd3 = b1 >= a1; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. + var rd4 = b2 >= a2; + ~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'B2' and 'A2'. + + // operator == + var re1 = a1 == b1; + var re2 = a2 == b2; + var re3 = b1 == a1; + var re4 = b2 == a2; + + // operator != + var rf1 = a1 != b1; + var rf2 = a2 != b2; + var rf3 = b1 != a1; + var rf4 = b2 != a2; + + // operator === + var rg1 = a1 === b1; + var rg2 = a2 === b2; + var rg3 = b1 === a1; + var rg4 = b2 === a2; + + // operator !== + var rh1 = a1 !== b1; + var rh2 = a2 !== b2; + var rh3 = b1 !== a1; + var rh4 = b2 !== a2; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt index ad97e4e1a5d42..cdf0b119153fe 100644 --- a/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt @@ -30,9 +30,25 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(38,15): error TS2367: This comparison appears to be unintentional because the types 'V' and 'T' have no overlap. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(39,15): error TS2367: This comparison appears to be unintentional because the types 'V' and 'T' have no overlap. tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(40,15): error TS2367: This comparison appears to be unintentional because the types 'V' and 'T' have no overlap. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(43,15): error TS2365: Operator '<' cannot be applied to types 'T' and '{}'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(44,15): error TS2365: Operator '>' cannot be applied to types 'T' and '{}'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(45,15): error TS2365: Operator '<=' cannot be applied to types 'T' and '{}'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(46,15): error TS2365: Operator '>=' cannot be applied to types 'T' and '{}'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(52,15): error TS2365: Operator '<' cannot be applied to types '{}' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(53,15): error TS2365: Operator '>' cannot be applied to types '{}' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(54,15): error TS2365: Operator '<=' cannot be applied to types '{}' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(55,15): error TS2365: Operator '>=' cannot be applied to types '{}' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(61,15): error TS2365: Operator '<' cannot be applied to types 'T' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(62,15): error TS2365: Operator '>' cannot be applied to types 'T' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(63,15): error TS2365: Operator '<=' cannot be applied to types 'T' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(64,15): error TS2365: Operator '>=' cannot be applied to types 'T' and 'Object'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(70,15): error TS2365: Operator '<' cannot be applied to types 'Object' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(71,15): error TS2365: Operator '>' cannot be applied to types 'Object' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(72,15): error TS2365: Operator '<=' cannot be applied to types 'Object' and 'T'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts(73,15): error TS2365: Operator '>=' cannot be applied to types 'Object' and 'T'. -==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts (32 errors) ==== +==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts (48 errors) ==== var a: {}; var b: Object; @@ -140,36 +156,68 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // ok var re1 = t < a; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{}'. var re2 = t > a; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'T' and '{}'. var re3 = t <= a; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and '{}'. var re4 = t >= a; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and '{}'. var re5 = t == a; var re6 = t != a; var re7 = t === a; var re8 = t !== a; var rf1 = a < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types '{}' and 'T'. var rf2 = a > t; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types '{}' and 'T'. var rf3 = a <= t; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types '{}' and 'T'. var rf4 = a >= t; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types '{}' and 'T'. var rf5 = a == t; var rf6 = a != t; var rf7 = a === t; var rf8 = a !== t; var rg1 = t < b; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'Object'. var rg2 = t > b; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'T' and 'Object'. var rg3 = t <= b; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and 'Object'. var rg4 = t >= b; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'Object'. var rg5 = t == b; var rg6 = t != b; var rg7 = t === b; var rg8 = t !== b; var rh1 = b < t; + ~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'Object' and 'T'. var rh2 = b > t; + ~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'Object' and 'T'. var rh3 = b <= t; + ~~~~~~ +!!! error TS2365: Operator '<=' cannot be applied to types 'Object' and 'T'. var rh4 = b >= t; + ~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'Object' and 'T'. var rh5 = b == t; var rh6 = b != t; var rh7 = b === t; diff --git a/tests/baselines/reference/instantiationExpressionErrors.errors.txt b/tests/baselines/reference/instantiationExpressionErrors.errors.txt index 446d469e34295..901c97312ce74 100644 --- a/tests/baselines/reference/instantiationExpressionErrors.errors.txt +++ b/tests/baselines/reference/instantiationExpressionErrors.errors.txt @@ -10,13 +10,14 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpr tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts(26,24): error TS2558: Expected 0 type arguments, but got 1. tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts(39,2): error TS2554: Expected 0 arguments, but got 1. tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts(43,12): error TS2365: Operator '<' cannot be applied to types '{ (): T; g(): U; }' and 'boolean'. +tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts(43,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'boolean'. tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts(44,12): error TS2365: Operator '<' cannot be applied to types '{ (): T; g(): U; }' and 'boolean'. tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts(44,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts(45,12): error TS2365: Operator '<' cannot be applied to types '{ (): T; g(): U; }' and 'boolean'. tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts(45,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. -==== tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts (16 errors) ==== +==== tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressionErrors.ts (17 errors) ==== declare let f: { (): T, g(): U }; // Type arguments in member expressions @@ -84,6 +85,8 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpr const r1 = f < true > true; ~~~~~~~~ !!! error TS2365: Operator '<' cannot be applied to types '{ (): T; g(): U; }' and 'boolean'. + ~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'boolean'. const r2 = f < true > +1; ~~~~~~~~ !!! error TS2365: Operator '<' cannot be applied to types '{ (): T; g(): U; }' and 'boolean'. diff --git a/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.errors.txt b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.errors.txt new file mode 100644 index 0000000000000..096b91fc8d315 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesWithVariousOperators01.errors.txt @@ -0,0 +1,36 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts(24,9): error TS2365: Operator '<' cannot be applied to types 'string | number' and 'string | number'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts(25,9): error TS2365: Operator '>=' cannot be applied to types 'string | number' and 'string'. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts (2 errors) ==== + let abc: "ABC" = "ABC"; + let xyz: "XYZ" = "XYZ"; + let abcOrXyz: "ABC" | "XYZ" = abc || xyz; + let abcOrXyzOrNumber: "ABC" | "XYZ" | number = abcOrXyz || 100; + + let a = "" + abc; + let b = abc + ""; + let c = 10 + abc; + let d = abc + 10; + let e = xyz + abc; + let f = abc + xyz; + let g = true + abc; + let h = abc + true; + let i = abc + abcOrXyz + xyz; + let j = abcOrXyz + abcOrXyz; + let k = +abcOrXyz; + let l = -abcOrXyz; + let m = abcOrXyzOrNumber + ""; + let n = "" + abcOrXyzOrNumber; + let o = abcOrXyzOrNumber + abcOrXyz; + let p = abcOrXyz + abcOrXyzOrNumber; + let q = !abcOrXyzOrNumber; + let r = ~abcOrXyzOrNumber; + let s = abcOrXyzOrNumber < abcOrXyzOrNumber; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '<' cannot be applied to types 'string | number' and 'string | number'. + let t = abcOrXyzOrNumber >= abcOrXyz; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '>=' cannot be applied to types 'string | number' and 'string'. + let u = abc === abcOrXyz; + let v = abcOrXyz === abcOrXyzOrNumber; \ No newline at end of file From 2bc04f33d882e1c1554ea14b33303c1551b94efe Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 20 Jan 2023 15:06:01 -0800 Subject: [PATCH 4/5] Add a global `valueOf(): number` type and use that for these checks --- src/compiler/checker.ts | 5 ++++- src/harness/fourslashInterfaceImpl.ts | 1 + src/lib/es5.d.ts | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4132f9e4e48ce..8ba76a0ed18b1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1910,7 +1910,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const stringOrNumberType = getUnionType([stringType, numberType]); const stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]); const keyofConstraintType = keyofStringsOnly ? stringType : stringNumberSymbolType; - const numberOrBigIntType = getUnionType([numberType, bigintType]); const templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]) as UnionType; const numericStringType = getTemplateLiteralType(["", ""], [numberType]); // The `${number}` type @@ -2044,6 +2043,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let globalReadonlyArrayType: GenericType; let globalStringType: ObjectType; let globalNumberType: ObjectType; + let globalNumericValueOfType: ObjectType; let globalBooleanType: ObjectType; let globalRegExpType: ObjectType; let globalThisType: GenericType; @@ -2051,6 +2051,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let autoArrayType: Type; let anyReadonlyArrayType: Type; let deferredGlobalNonNullableTypeAlias: Symbol; + let numberOrBigIntType: Type; // The library files are only loaded when the feature is used. // This allows users to just specify library files they want to used through --lib @@ -46217,6 +46218,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { globalNumberType = getGlobalType("Number" as __String, /*arity*/ 0, /*reportErrors*/ true); globalBooleanType = getGlobalType("Boolean" as __String, /*arity*/ 0, /*reportErrors*/ true); globalRegExpType = getGlobalType("RegExp" as __String, /*arity*/ 0, /*reportErrors*/ true); + globalNumericValueOfType = getGlobalType("NumericValueOf" as __String, /*arity*/ 0, /*reportErrors*/ false) || globalNumberType; + numberOrBigIntType = getUnionType([globalNumericValueOfType, bigintType]); anyArrayType = createArrayType(anyType); autoArrayType = createArrayType(autoType); diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index f3eb069e6f647..b77c2a5ffbc1f 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -1137,6 +1137,7 @@ export namespace Completion { interfaceEntry("StringConstructor"), varEntry("Boolean"), interfaceEntry("BooleanConstructor"), + interfaceEntry("NumericValueOf"), varEntry("Number"), interfaceEntry("NumberConstructor"), interfaceEntry("TemplateStringsArray"), diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index a74b3cb4c2111..d4b3f1cfc65f3 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -251,6 +251,10 @@ interface ObjectConstructor { */ declare var Object: ObjectConstructor; +interface NumericValueOf { + valueOf(): number; +} + /** * Creates a new function. */ From cef60e3059da9b9e26aefd4a275e312c143d0deb Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 20 Jan 2023 15:06:14 -0800 Subject: [PATCH 5/5] Baseline updates --- .../arithmeticOnInvalidTypes.errors.txt | 22 +- ...eticOperatorWithInvalidOperands.errors.txt | 424 +----------------- ...aintOfJavascriptClassExpression.errors.txt | 2 +- .../completionsStringMethods.baseline | 4 +- ...tructuringParameterDeclaration4.errors.txt | 2 +- .../reference/destructuringTuple.errors.txt | 4 +- .../duplicateNumericIndexers.errors.txt | 4 +- ...tionOperatorWithInvalidOperands.errors.txt | 46 +- .../reference/externModule.errors.txt | 8 +- .../reference/invalidTypeOfTarget.errors.txt | 2 +- ...ithAsClauseAndLateBoundProperty.errors.txt | 2 +- ...wExceptionVariableInCatchClause.errors.txt | 2 +- .../narrowFromAnyWithInstanceof.errors.txt | 4 +- .../narrowFromAnyWithTypePredicate.errors.txt | 4 +- .../reference/numberVsBigIntOperations.types | 6 +- ...erAccessAfterPostfixExpression1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity2.errors.txt | 2 +- .../reference/parserS7.2_A1.5_T2.errors.txt | 4 +- .../reference/parserS7.3_A1.1_T2.errors.txt | 2 +- .../reference/parserS7.6_A4.2_T1.errors.txt | 20 +- .../reference/parserUnicode1.errors.txt | 4 +- .../reference/promisePermutations.errors.txt | 2 +- .../reference/promisePermutations2.errors.txt | 2 +- .../reference/promisePermutations3.errors.txt | 4 +- .../reference/redefineArray.errors.txt | 2 +- .../reference/scannerS7.2_A1.5_T2.errors.txt | 4 +- .../reference/scannerS7.3_A1.1_T2.errors.txt | 2 +- .../reference/scannerS7.6_A4.2_T1.errors.txt | 20 +- ...eStringsWithOverloadResolution1.errors.txt | 2 +- ...ingsWithOverloadResolution1_ES6.errors.txt | 2 +- 31 files changed, 66 insertions(+), 546 deletions(-) diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt b/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt index ac526ccc5a93d..a83e0af4fd754 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt +++ b/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt @@ -1,30 +1,12 @@ tests/cases/compiler/arithmeticOnInvalidTypes.ts(3,9): error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(4,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(4,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(5,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(5,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(6,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(6,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/compiler/arithmeticOnInvalidTypes.ts (7 errors) ==== +==== tests/cases/compiler/arithmeticOnInvalidTypes.ts (1 errors) ==== var x: Number; var y: Number; var z = x + y; ~~~~~ !!! error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. var z2 = x - y; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var z3 = x * y; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - var z4 = x / y; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. \ No newline at end of file + var z4 = x / y; \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt index cfcd2cded798c..803f8eb8b3a5b 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt @@ -1,7 +1,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(15,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(17,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(18,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(19,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(22,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -11,11 +10,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(25,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(25,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(26,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(26,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(29,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(31,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(32,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(33,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(35,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(36,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(36,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -25,7 +22,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(39,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(40,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(42,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(43,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(43,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -35,29 +31,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(46,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(46,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(47,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(50,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(50,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(51,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(52,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(52,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(53,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(53,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(54,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(54,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(57,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(59,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(60,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(61,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(67,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(68,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(72,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(74,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(75,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(76,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(78,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(79,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(79,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -67,11 +52,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(82,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(83,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(86,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(88,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(89,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(90,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(92,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(93,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(93,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -81,7 +64,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(96,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(96,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(97,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(97,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(100,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -91,29 +73,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(103,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(103,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(104,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(104,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(107,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(109,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(109,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(110,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(110,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(111,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(111,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(114,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(116,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(117,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(118,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(121,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(129,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(131,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(132,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(133,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(135,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(136,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(136,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -123,11 +94,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(139,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(139,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(140,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(143,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(145,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(146,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(147,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(150,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -137,7 +106,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(153,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(153,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(154,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(154,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(156,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(157,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -147,29 +115,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(160,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(160,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(161,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(161,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(163,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(164,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(164,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(165,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(166,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(166,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(167,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(167,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(168,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(168,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(171,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(173,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(174,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(175,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(178,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(180,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(181,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(182,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(186,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(188,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(189,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(190,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(192,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(193,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(193,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -179,11 +136,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(196,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(196,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(197,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(197,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(200,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(202,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(203,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(204,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(206,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(207,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(207,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -193,7 +148,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(210,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(210,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(211,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(211,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(213,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(214,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(214,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -203,29 +157,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(217,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(217,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(218,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(218,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(220,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(221,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(221,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(222,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(223,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(223,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(224,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(224,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(225,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(225,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(228,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(230,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(231,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(232,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(235,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(237,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(238,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(239,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(243,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(245,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(246,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(247,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(249,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(250,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(250,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -235,11 +178,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(253,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(253,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(254,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(254,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(257,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(259,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(260,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(261,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(263,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(264,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(264,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -249,7 +190,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(267,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(267,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(268,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(268,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(270,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(271,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(271,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -259,29 +199,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(274,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(274,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(275,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(275,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(277,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(278,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(278,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(279,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(280,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(280,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(281,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(281,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(282,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(282,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(285,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(287,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(288,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(289,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(292,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(294,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(295,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(296,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(300,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(302,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(303,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(304,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(306,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(307,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(307,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -291,11 +220,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(310,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(310,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(311,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(311,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(314,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(316,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(317,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(318,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(320,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(321,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(321,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -305,7 +232,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(324,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(324,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(325,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(325,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(327,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(328,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(328,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -315,29 +241,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(331,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(331,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(332,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(332,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(334,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(335,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(335,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(336,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(337,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(337,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(338,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(338,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(339,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(339,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(342,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(344,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(345,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(346,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(349,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(351,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(352,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(353,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(357,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(359,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(360,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(361,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(363,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(364,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(364,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -347,11 +262,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(367,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(367,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(368,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(368,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(371,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(373,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(374,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(375,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(377,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(378,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(378,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -361,7 +274,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(381,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(381,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(382,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(382,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(384,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(385,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(385,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -371,29 +283,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(388,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(388,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(389,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(389,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(391,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(392,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(392,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(393,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(394,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(394,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(395,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(395,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(396,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(396,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(399,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(401,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(402,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(403,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(406,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(408,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(409,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(410,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(414,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(416,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(417,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(418,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(420,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(421,12): error TS2447: The '&' operator is not allowed for boolean types. Consider using '&&' instead. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(422,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -402,11 +303,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(424,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(424,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(425,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(425,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(428,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(430,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(431,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(432,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(434,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(435,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(435,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -416,7 +315,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(438,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(438,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(439,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(439,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(441,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(442,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(442,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -426,29 +324,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(445,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(445,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(446,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(446,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(448,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(449,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(449,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(450,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(451,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(451,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(452,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(452,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(453,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(453,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(456,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(458,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(459,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(460,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(463,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(465,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(466,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(467,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(471,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(473,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(474,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(475,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(477,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(478,12): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(479,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -457,11 +344,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(481,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(481,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(482,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(482,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(485,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(487,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(488,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(489,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(491,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(492,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(492,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -471,7 +356,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(495,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(495,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(496,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(496,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(498,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(499,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(499,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -481,29 +365,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(502,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(502,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(503,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(503,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(505,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(506,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(506,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(507,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(508,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(508,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(509,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(509,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(510,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(510,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(513,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(515,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(516,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(517,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(520,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(522,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(523,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(524,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(528,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(530,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(531,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(532,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(534,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(535,13): error TS2447: The '|' operator is not allowed for boolean types. Consider using '||' instead. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(536,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -512,11 +385,9 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(538,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(538,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(539,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(539,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(542,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(544,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(545,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(546,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(548,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(549,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(549,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -526,7 +397,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(552,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(552,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(553,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(553,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(555,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(556,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(556,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -536,28 +406,18 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(559,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(559,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(560,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(560,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(562,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(563,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(563,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(564,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(565,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(565,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(566,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(566,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(567,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(567,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(570,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(572,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(573,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(574,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(577,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(579,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(580,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(581,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts (557 errors) ==== +==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts (417 errors) ==== // these operators require their operands to be of type Any, the Number primitive type, or // an enum type enum E { a, b, c } @@ -583,8 +443,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a6 = a * f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1b1 = b * a; ~ @@ -610,8 +468,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r1b6 = b * f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c1 = c * a; //ok var r1c2 = c * b; @@ -625,8 +481,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c6 = c * f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1d1 = d * a; ~ @@ -652,8 +506,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r1d6 = d * f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1e1 = e * a; ~ @@ -679,35 +531,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r1e6 = e * f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f1 = f * a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f2 = f * b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f3 = f * c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f4 = f * d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f5 = f * e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f6 = f * f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1g1 = E.a * a; //ok var r1g2 = E.a * b; @@ -721,8 +557,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1g6 = E.a * f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1h1 = a * E.b; //ok var r1h2 = b * E.b; @@ -736,8 +570,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1h6 = f * E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator / var r2a1 = a / a; //ok @@ -752,8 +584,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2a6 = a / f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2b1 = b / a; ~ @@ -779,8 +609,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r2b6 = b / f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2c1 = c / a; //ok var r2c2 = c / b; @@ -794,8 +622,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2c6 = c / f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2d1 = d / a; ~ @@ -821,8 +647,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r2d6 = d / f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2e1 = e / a; ~ @@ -848,35 +672,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r2e6 = e / f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2f1 = f / a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2f2 = f / b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2f3 = f / c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2f4 = f / d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2f5 = f / e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2f6 = f / f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2g1 = E.a / a; //ok var r2g2 = E.a / b; @@ -890,8 +698,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2g6 = E.a / f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2h1 = a / E.b; //ok var r2h2 = b / E.b; @@ -905,8 +711,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2h6 = f / E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator % var r3a1 = a % a; //ok @@ -921,8 +725,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3a6 = a % f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3b1 = b % a; ~ @@ -948,8 +750,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r3b6 = b % f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3c1 = c % a; //ok var r3c2 = c % b; @@ -963,8 +763,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3c6 = c % f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3d1 = d % a; ~ @@ -990,8 +788,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r3d6 = d % f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3e1 = e % a; ~ @@ -1017,35 +813,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r3e6 = e % f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3f1 = f % a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3f2 = f % b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3f3 = f % c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3f4 = f % d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3f5 = f % e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3f6 = f % f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3g1 = E.a % a; //ok var r3g2 = E.a % b; @@ -1059,8 +839,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3g6 = E.a % f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3h1 = a % E.b; //ok var r3h2 = b % E.b; @@ -1074,8 +852,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3h6 = f % E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator - var r4a1 = a - a; //ok @@ -1090,8 +866,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4a6 = a - f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4b1 = b - a; ~ @@ -1117,8 +891,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r4b6 = b - f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4c1 = c - a; //ok var r4c2 = c - b; @@ -1132,8 +904,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4c6 = c - f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4d1 = d - a; ~ @@ -1159,8 +929,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r4d6 = d - f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4e1 = e - a; ~ @@ -1186,35 +954,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r4e6 = e - f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4f1 = f - a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4f2 = f - b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4f3 = f - c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4f4 = f - d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4f5 = f - e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4f6 = f - f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4g1 = E.a - a; //ok var r4g2 = E.a - b; @@ -1228,8 +980,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4g6 = E.a - f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4h1 = a - E.b; //ok var r4h2 = b - E.b; @@ -1243,8 +993,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4h6 = f - E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator << var r5a1 = a << a; //ok @@ -1259,8 +1007,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5a6 = a << f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5b1 = b << a; ~ @@ -1286,8 +1032,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r5b6 = b << f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5c1 = c << a; //ok var r5c2 = c << b; @@ -1301,8 +1045,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5c6 = c << f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5d1 = d << a; ~ @@ -1328,8 +1070,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r5d6 = d << f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5e1 = e << a; ~ @@ -1355,35 +1095,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r5e6 = e << f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5f1 = f << a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5f2 = f << b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5f3 = f << c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5f4 = f << d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5f5 = f << e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5f6 = f << f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5g1 = E.a << a; //ok var r5g2 = E.a << b; @@ -1397,8 +1121,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5g6 = E.a << f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5h1 = a << E.b; //ok var r5h2 = b << E.b; @@ -1412,8 +1134,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5h6 = f << E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator >> var r6a1 = a >> a; //ok @@ -1428,8 +1148,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6a6 = a >> f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6b1 = b >> a; ~ @@ -1455,8 +1173,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r6b6 = b >> f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6c1 = c >> a; //ok var r6c2 = c >> b; @@ -1470,8 +1186,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6c6 = c >> f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6d1 = d >> a; ~ @@ -1497,8 +1211,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r6d6 = d >> f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6e1 = e >> a; ~ @@ -1524,35 +1236,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r6e6 = e >> f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6f1 = f >> a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6f2 = f >> b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6f3 = f >> c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6f4 = f >> d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6f5 = f >> e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6f6 = f >> f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6g1 = E.a >> a; //ok var r6g2 = E.a >> b; @@ -1566,8 +1262,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6g6 = E.a >> f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6h1 = a >> E.b; //ok var r6h2 = b >> E.b; @@ -1581,8 +1275,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6h6 = f >> E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator >>> var r7a1 = a >>> a; //ok @@ -1597,8 +1289,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7a6 = a >>> f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7b1 = b >>> a; ~ @@ -1624,8 +1314,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r7b6 = b >>> f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7c1 = c >>> a; //ok var r7c2 = c >>> b; @@ -1639,8 +1327,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7c6 = c >>> f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7d1 = d >>> a; ~ @@ -1666,8 +1352,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r7d6 = d >>> f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7e1 = e >>> a; ~ @@ -1693,35 +1377,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r7e6 = e >>> f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7f1 = f >>> a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7f2 = f >>> b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7f3 = f >>> c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7f4 = f >>> d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7f5 = f >>> e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7f6 = f >>> f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7g1 = E.a >>> a; //ok var r7g2 = E.a >>> b; @@ -1735,8 +1403,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7g6 = E.a >>> f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7h1 = a >>> E.b; //ok var r7h2 = b >>> E.b; @@ -1750,8 +1416,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7h6 = f >>> E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator & var r8a1 = a & a; //ok @@ -1766,8 +1430,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8a6 = a & f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8b1 = b & a; ~ @@ -1791,8 +1453,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r8b6 = b & f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8c1 = c & a; //ok var r8c2 = c & b; @@ -1806,8 +1466,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8c6 = c & f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8d1 = d & a; ~ @@ -1833,8 +1491,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r8d6 = d & f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8e1 = e & a; ~ @@ -1860,35 +1516,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r8e6 = e & f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8f1 = f & a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8f2 = f & b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8f3 = f & c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8f4 = f & d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8f5 = f & e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8f6 = f & f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8g1 = E.a & a; //ok var r8g2 = E.a & b; @@ -1902,8 +1542,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8g6 = E.a & f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8h1 = a & E.b; //ok var r8h2 = b & E.b; @@ -1917,8 +1555,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8h6 = f & E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator ^ var r9a1 = a ^ a; //ok @@ -1933,8 +1569,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9a6 = a ^ f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9b1 = b ^ a; ~ @@ -1958,8 +1592,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r9b6 = b ^ f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9c1 = c ^ a; //ok var r9c2 = c ^ b; @@ -1973,8 +1605,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9c6 = c ^ f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9d1 = d ^ a; ~ @@ -2000,8 +1630,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r9d6 = d ^ f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9e1 = e ^ a; ~ @@ -2027,35 +1655,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r9e6 = e ^ f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9f1 = f ^ a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9f2 = f ^ b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9f3 = f ^ c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9f4 = f ^ d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9f5 = f ^ e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9f6 = f ^ f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9g1 = E.a ^ a; //ok var r9g2 = E.a ^ b; @@ -2069,8 +1681,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9g6 = E.a ^ f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9h1 = a ^ E.b; //ok var r9h2 = b ^ E.b; @@ -2084,8 +1694,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9h6 = f ^ E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. // operator | var r10a1 = a | a; //ok @@ -2100,8 +1708,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10a6 = a | f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10b1 = b | a; ~ @@ -2125,8 +1731,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r10b6 = b | f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10c1 = c | a; //ok var r10c2 = c | b; @@ -2140,8 +1744,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10c6 = c | f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10d1 = d | a; ~ @@ -2167,8 +1769,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r10d6 = d | f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10e1 = e | a; ~ @@ -2194,35 +1794,19 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r10e6 = e | f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10f1 = f | a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10f2 = f | b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10f3 = f | c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10f4 = f | d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10f5 = f | e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10f6 = f | f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10g1 = E.a | a; //ok var r10g2 = E.a | b; @@ -2236,8 +1820,6 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10g6 = E.a | f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10h1 = a | E.b; //ok var r10h2 = b | E.b; @@ -2250,6 +1832,4 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti var r10h5 = e | E.b; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - var r10h6 = f | E.b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. \ No newline at end of file + var r10h6 = f | E.b; \ No newline at end of file diff --git a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt index a8067965c68f0..a95df396712ac 100644 --- a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt +++ b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt @@ -9,7 +9,7 @@ tests/cases/compiler/weird.js(9,17): error TS7006: Parameter 'error' implicitly someFunction(function(BaseClass) { ~~~~~~~~~~~~ !!! error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? -!!! related TS2728 /.ts/lib.es5.d.ts:321:13: 'Function' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:325:13: 'Function' is declared here. ~~~~~~~~~ !!! error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. 'use strict'; diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline index 0ef6b4203714d..b0598e2b63c5b 100644 --- a/tests/baselines/reference/completionsStringMethods.baseline +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -1105,7 +1105,7 @@ "target": { "fileName": "lib.d.ts", "textSpan": { - "start": 18529, + "start": 18582, "length": 28 } } @@ -1128,7 +1128,7 @@ "target": { "fileName": "lib.d.ts", "textSpan": { - "start": 18529, + "start": 18582, "length": 28 } } diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index d6c101ccd028f..67c7783cc75c1 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ !!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? -!!! related TS2728 /.ts/lib.es5.d.ts:1498:13: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1502:13: 'Array' is declared here. a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type '[[any]]'. diff --git a/tests/baselines/reference/destructuringTuple.errors.txt b/tests/baselines/reference/destructuringTuple.errors.txt index b0fa1bd259fe2..d5991c4805f6a 100644 --- a/tests/baselines/reference/destructuringTuple.errors.txt +++ b/tests/baselines/reference/destructuringTuple.errors.txt @@ -33,8 +33,8 @@ tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload mat !!! error TS2769: Overload 2 of 3, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. !!! error TS2769: Type 'never[]' is not assignable to type '[]'. !!! error TS2769: Target allows only 0 element(s) but source may have more. -!!! related TS6502 /.ts/lib.es5.d.ts:1463:24: The expected type comes from the return type of this signature. -!!! related TS6502 /.ts/lib.es5.d.ts:1469:27: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1467:24: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1473:27: The expected type comes from the return type of this signature. ~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. diff --git a/tests/baselines/reference/duplicateNumericIndexers.errors.txt b/tests/baselines/reference/duplicateNumericIndexers.errors.txt index 826a48d1c815b..2f38972c7feb0 100644 --- a/tests/baselines/reference/duplicateNumericIndexers.errors.txt +++ b/tests/baselines/reference/duplicateNumericIndexers.errors.txt @@ -10,8 +10,8 @@ tests/cases/conformance/types/members/duplicateNumericIndexers.ts(24,5): error T tests/cases/conformance/types/members/duplicateNumericIndexers.ts(25,5): error TS2374: Duplicate index signature for type 'number'. tests/cases/conformance/types/members/duplicateNumericIndexers.ts(29,5): error TS2374: Duplicate index signature for type 'number'. tests/cases/conformance/types/members/duplicateNumericIndexers.ts(30,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(520,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(1484,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(524,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(1488,5): error TS2374: Duplicate index signature for type 'number'. ==== tests/cases/conformance/types/members/duplicateNumericIndexers.ts (12 errors) ==== diff --git a/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.errors.txt index da9141bc7ff52..c56e4ddc95e34 100644 --- a/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.errors.txt @@ -1,7 +1,6 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(15,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(17,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(18,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(19,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(22,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -11,11 +10,9 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(25,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(25,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(26,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(26,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(29,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(31,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(32,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(33,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(35,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(36,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(36,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -25,7 +22,6 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(39,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(40,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(42,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(43,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(43,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -35,28 +31,18 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(46,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(46,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(47,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(50,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(50,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(51,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(52,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(52,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(53,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(53,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(54,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(54,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(57,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(59,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(60,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(61,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(67,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(68,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts (56 errors) ==== +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts (42 errors) ==== // these operators require their operands to be of type Any, the Number primitive type, or // an enum type enum E { a, b, c } @@ -82,8 +68,6 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a6 = a ** f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1b1 = b ** a; ~ @@ -109,8 +93,6 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv var r1b6 = b ** f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c1 = c ** a; //ok var r1c2 = c ** b; @@ -124,8 +106,6 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c6 = c ** f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1d1 = d ** a; ~ @@ -151,8 +131,6 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv var r1d6 = d ** f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1e1 = e ** a; ~ @@ -178,35 +156,19 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv var r1e6 = e ** f; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f1 = f ** a; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f2 = f ** b; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f3 = f ** c; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f4 = f ** d; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f5 = f ** e; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1f6 = f ** f; - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1g1 = E.a ** a; //ok var r1g2 = E.a ** b; @@ -220,8 +182,6 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1g6 = E.a ** f; - ~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1h1 = a ** E.b; //ok var r1h2 = b ** E.b; @@ -234,6 +194,4 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv var r1h5 = e ** E.b; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - var r1h6 = f ** E.b - ~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. \ No newline at end of file + var r1h6 = f ** E.b \ No newline at end of file diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index c3e3352d75be4..a3928559265d4 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -66,20 +66,20 @@ tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDat var d=new XDate(); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:941:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:945:13: 'Date' is declared here. d.getDay(); d=new XDate(1978,2); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:941:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:945:13: 'Date' is declared here. d.getXDate(); var n=XDate.parse("3/2/2004"); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:941:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:945:13: 'Date' is declared here. n=XDate.UTC(1964,2,1); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:941:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:945:13: 'Date' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/invalidTypeOfTarget.errors.txt b/tests/baselines/reference/invalidTypeOfTarget.errors.txt index 0bcd66b4dd6f0..4baea5ec8f72d 100644 --- a/tests/baselines/reference/invalidTypeOfTarget.errors.txt +++ b/tests/baselines/reference/invalidTypeOfTarget.errors.txt @@ -36,7 +36,7 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts var x7: typeof function f() { }; ~~~~~~~~ !!! error TS2552: Cannot find name 'function'. Did you mean 'Function'? -!!! related TS2728 /.ts/lib.es5.d.ts:321:13: 'Function' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:325:13: 'Function' is declared here. ~ !!! error TS1005: ',' expected. ~ diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt index aa57a8ac9035e..2e396a60f93eb 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt @@ -7,5 +7,5 @@ tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error T tgt2 = src2; // Should error ~~~~ !!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. -!!! related TS2728 /.ts/lib.es5.d.ts:1307:5: 'length' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1311:5: 'length' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt index b07c2eb109593..bcb65c172de2a 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt @@ -24,7 +24,7 @@ tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17) err.massage; // ERROR: Property 'massage' does not exist on type 'Error' ~~~~~~~ !!! error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1057:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1061:5: 'message' is declared here. } else { diff --git a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt index 0292b260eac4b..70da479cf973f 100644 --- a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt @@ -22,7 +22,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1057:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1061:5: 'message' is declared here. } if (x instanceof Date) { @@ -30,6 +30,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:786:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:790:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt index 0e5168963afc6..ba2ea45eb69ea 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1057:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1061:5: 'message' is declared here. } if (isDate(x)) { @@ -49,6 +49,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:786:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:790:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/numberVsBigIntOperations.types b/tests/baselines/reference/numberVsBigIntOperations.types index 4fc625d3e8202..d066df56ce179 100644 --- a/tests/baselines/reference/numberVsBigIntOperations.types +++ b/tests/baselines/reference/numberVsBigIntOperations.types @@ -628,15 +628,15 @@ if (typeof bigIntOrNumber === "number") { >bigIntOrNumber : number | bigint ~bigIntOrNumber; // should infer number | bigint ->~bigIntOrNumber : number | bigint +>~bigIntOrNumber : bigint | NumericValueOf >bigIntOrNumber : number | bigint bigIntOrNumber++; // should infer number | bigint ->bigIntOrNumber++ : number | bigint +>bigIntOrNumber++ : bigint | NumericValueOf >bigIntOrNumber : number | bigint ++bigIntOrNumber; // should infer number | bigint ->++bigIntOrNumber : number | bigint +>++bigIntOrNumber : bigint | NumericValueOf >bigIntOrNumber : number | bigint let anyValue: any; diff --git a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt index e54869c75ca99..6067da37b14aa 100644 --- a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt +++ b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt @@ -11,4 +11,4 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPo !!! error TS1005: ';' expected. ~~~~~~~~ !!! error TS2552: Cannot find name 'toString'. Did you mean 'String'? -!!! related TS2728 /.ts/lib.es5.d.ts:533:13: 'String' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:537:13: 'String' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt index c808903b073a6..2caffcf420984 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt @@ -7,6 +7,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1053:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1057:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt index 0f8129fff7f04..5527a94de46fc 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre (1) /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1053:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1057:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt index 21f0375cfb473..c5d6fc03ef7b4 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt index 26d6645fef9cb..bf205cbbe18a3 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt index 82d6f4a9ccf9f..9970954ac7085 100644 --- a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(142,3): error T $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/parserUnicode1.errors.txt b/tests/baselines/reference/parserUnicode1.errors.txt index 3bf3ec8da574f..0781697f74235 100644 --- a/tests/baselines/reference/parserUnicode1.errors.txt +++ b/tests/baselines/reference/parserUnicode1.errors.txt @@ -11,13 +11,13 @@ tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2552 $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } } catch (e) { $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index 069760228de90..f78de6909e776 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -447,7 +447,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2769: No overload m !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1538:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1542:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index 570f1911c9e4c..303c4723187e9 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -351,7 +351,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of ~~~~~~~~~ !!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1538:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1542:5: 'catch' is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index ad198fb310013..84d3d48d0920d 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -398,7 +398,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1538:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1542:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -445,5 +445,5 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1538:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1542:5: 'catch' is declared here. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index 24f7d9a356eb8..2693385983841 100644 --- a/tests/baselines/reference/redefineArray.errors.txt +++ b/tests/baselines/reference/redefineArray.errors.txt @@ -5,4 +5,4 @@ tests/cases/compiler/redefineArray.ts(1,1): error TS2741: Property 'isArray' is Array = function (n:number, s:string) {return n;}; ~~~~~ !!! error TS2741: Property 'isArray' is missing in type '(n: number, s: string) => number' but required in type 'ArrayConstructor'. -!!! related TS2728 /.ts/lib.es5.d.ts:1494:5: 'isArray' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:1498:5: 'isArray' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt index 45e3b25526bcd..85bdaf105faef 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt index 0e33986fca7bc..941faea1a7f52 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt index 3ca2bfc9437ed..34791f39693ed 100644 --- a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(142,3): error $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1067:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1071:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index 7222dcffe926c..87f7843ca2e70 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:611:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:615:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt index b7d6f9b7ab011..c4c96373666f1 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:611:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:615:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~