From 8b35c1300e14ebc026b4f1621db8f6f1bba30833 Mon Sep 17 00:00:00 2001 From: Alexis Cheron Date: Fri, 16 Sep 2022 03:13:53 +0400 Subject: [PATCH] The error "Object is possibly null or undefined" is ambiguous. (#49797) * added object name to TS2571, 2531, 2532 and 2533 * updated localized diagnostic messages * updated baseline to fit diagnostic message change * Revert "updated localized diagnostic messages" This reverts commit 738cf094bdb4a1f07d74f90747afe00366549300. * specialized the error to EntityNameExpression * updated baseline to fit new changes * added multiline undefined access test * added TS18049 - value cannot be used here * adjusted baseline * corrected a small linting issue * Update error numbers after merge from main Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> --- src/compiler/checker.ts | 47 +- src/compiler/diagnosticMessages.json | 20 + ...WithNullValueAndInvalidOperands.errors.txt | 480 +++++++++--------- ...orWithNullValueAndValidOperands.errors.txt | 320 ++++++------ ...thOnlyNullValueOrUndefinedValue.errors.txt | 320 ++++++------ ...ndefinedValueAndInvalidOperands.errors.txt | 480 +++++++++--------- ...hUndefinedValueAndValidOperands.errors.txt | 320 ++++++------ .../reference/binaryArithmatic1.errors.txt | 4 +- .../reference/binaryArithmatic2.errors.txt | 4 +- .../reference/binaryArithmatic3.errors.txt | 8 +- .../reference/binaryArithmatic4.errors.txt | 8 +- ...wiseNotOperatorWithAnyOtherType.errors.txt | 8 +- .../circularOptionalityRemoval.errors.txt | 4 +- ...ratorWithIdenticalPrimitiveType.errors.txt | 64 +-- ...sonOperatorWithOneOperandIsNull.errors.txt | 256 +++++----- ...meticAssignmentLHSCanBeAssigned.errors.txt | 24 +- ...icAssignmentWithInvalidOperands.errors.txt | 32 +- .../compoundAssignmentLHSIsValue.errors.txt | 4 +- ...tionAssignmentLHSCanBeAssigned1.errors.txt | 24 +- ...onAssignmentLHSCannotBeAssigned.errors.txt | 32 +- ...onentiationAssignmentLHSIsValue.errors.txt | 4 +- .../contextuallyTypedIifeStrict.errors.txt | 12 +- .../controlFlowGenericTypes.errors.txt | 12 +- .../controlFlowOptionalChain.errors.txt | 220 ++++---- ...thAnyOtherTypeInvalidOperations.errors.txt | 8 +- .../destructuringControlFlow.errors.txt | 4 +- .../reference/equalityStrictNulls.errors.txt | 16 +- ...WithNullValueAndInvalidOperands.errors.txt | 48 +- ...orWithNullValueAndValidOperands.errors.txt | 32 +- ...thOnlyNullValueOrUndefinedValue.errors.txt | 32 +- ...ndefinedValueAndInvalidOperands.errors.txt | 48 +- ...hUndefinedValueAndValidOperands.errors.txt | 32 +- .../forInStrictNullChecksNoError.errors.txt | 4 +- ...gReturnStatementsAndExpressions.errors.txt | 4 +- .../implicitConstParameters.errors.txt | 8 +- .../inOperatorWithInvalidOperands.errors.txt | 16 +- ...thAnyOtherTypeInvalidOperations.errors.txt | 8 +- tests/baselines/reference/literals.errors.txt | 16 +- ...gicalAssignment4(target=es2015).errors.txt | 8 +- ...gicalAssignment4(target=es2020).errors.txt | 8 +- ...gicalAssignment4(target=es2021).errors.txt | 8 +- ...gicalAssignment4(target=esnext).errors.txt | 8 +- ...gicalAssignment5(target=es2015).errors.txt | 8 +- ...gicalAssignment5(target=es2020).errors.txt | 8 +- ...gicalAssignment5(target=es2021).errors.txt | 8 +- ...gicalAssignment5(target=esnext).errors.txt | 8 +- .../moduleVariableArrayIndexer.errors.txt | 4 +- .../narrowingTruthyObject.errors.txt | 4 +- ...negateOperatorInvalidOperations.errors.txt | 24 +- .../negateOperatorWithAnyOtherType.errors.txt | 8 +- ...eckedIndexedAccessDestructuring.errors.txt | 42 +- .../noUncheckedIndexedAccessDestructuring.js | 21 + ...ncheckedIndexedAccessDestructuring.symbols | 58 ++- ...oUncheckedIndexedAccessDestructuring.types | 35 ++ .../nonPrimitiveStrictNull.errors.txt | 28 +- .../reference/nullKeyword.errors.txt | 4 +- .../nullishCoalescingOperator11.errors.txt | 4 +- .../nullishCoalescingOperator4.errors.txt | 8 +- .../omittedExpressionForOfLoop.errors.txt | 4 +- .../plusOperatorWithAnyOtherType.errors.txt | 8 +- .../reference/privateNameAndAny.errors.txt | 20 +- ...meInInExpression(target=es2022).errors.txt | 4 +- ...meInInExpression(target=esnext).errors.txt | 4 +- .../reference/propertyAccess4.errors.txt | 4 +- .../reference/propertyAccess5.errors.txt | 4 +- ...seMappedPartiallyInferableTypes.errors.txt | 4 +- ...ecialIntersectionsInMappedTypes.errors.txt | 4 +- .../baselines/reference/typeofThis.errors.txt | 4 +- .../reference/unknownType1.errors.txt | 48 +- .../reference/widenedTypes.errors.txt | 8 +- .../noUncheckedIndexedAccessDestructuring.ts | 12 + 71 files changed, 1793 insertions(+), 1622 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fabe59ac0d513..9f38c49c50a31 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -29172,11 +29172,30 @@ namespace ts { } function reportObjectPossiblyNullOrUndefinedError(node: Node, facts: TypeFacts) { - error(node, facts & TypeFacts.IsUndefined ? facts & TypeFacts.IsNull ? - Diagnostics.Object_is_possibly_null_or_undefined : - Diagnostics.Object_is_possibly_undefined : - Diagnostics.Object_is_possibly_null - ); + const nodeText = isEntityNameExpression(node) ? entityNameToString(node) : undefined; + if (node.kind === SyntaxKind.NullKeyword) { + error(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); + return; + } + if (nodeText !== undefined && nodeText.length < 100) { + if (isIdentifier(node) && nodeText === "undefined") { + error(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); + return; + } + error(node, facts & TypeFacts.IsUndefined ? facts & TypeFacts.IsNull ? + Diagnostics._0_is_possibly_null_or_undefined : + Diagnostics._0_is_possibly_undefined : + Diagnostics._0_is_possibly_null, + nodeText + ); + } + else { + error(node, facts & TypeFacts.IsUndefined ? facts & TypeFacts.IsNull ? + Diagnostics.Object_is_possibly_null_or_undefined : + Diagnostics.Object_is_possibly_undefined : + Diagnostics.Object_is_possibly_null + ); + } } function reportCannotInvokePossiblyNullOrUndefinedError(node: Node, facts: TypeFacts) { @@ -29193,6 +29212,13 @@ namespace ts { reportError: (node: Node, facts: TypeFacts) => void ): Type { if (strictNullChecks && type.flags & TypeFlags.Unknown) { + if (isEntityNameExpression(node)) { + const nodeText = entityNameToString(node); + if (nodeText.length < 100) { + error(node, Diagnostics._0_is_of_type_unknown, nodeText); + return errorType; + } + } error(node, Diagnostics.Object_is_of_type_unknown); return errorType; } @@ -29212,6 +29238,17 @@ namespace ts { function checkNonNullNonVoidType(type: Type, node: Node): Type { const nonNullType = checkNonNullType(type, node); if (nonNullType.flags & TypeFlags.Void) { + if (isEntityNameExpression(node)) { + const nodeText = entityNameToString(node); + if (isIdentifier(node) && nodeText === "undefined") { + error(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText); + return nonNullType; + } + if (nodeText.length < 100) { + error(node, Diagnostics._0_is_possibly_undefined, nodeText); + return nonNullType; + } + } error(node, Diagnostics.Object_is_possibly_undefined); } return nonNullType; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index bc71059ac83aa..2ccc8197830cc 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -7497,5 +7497,25 @@ "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.": { "category": "Error", "code": 18045 + }, + "'{0}' is of type 'unknown'.": { + "category": "Error", + "code": 18046 + }, + "'{0}' is possibly 'null'.": { + "category": "Error", + "code": 18047 + }, + "'{0}' is possibly 'undefined'.": { + "category": "Error", + "code": 18048 + }, + "'{0}' is possibly 'null' or 'undefined'.": { + "category": "Error", + "code": 18049 + }, + "The value '{0}' cannot be used here.": { + "category": "Error", + "code": 18050 } } diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt index e352fbf906082..6c527e4f41d69 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt @@ -1,243 +1,243 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,19): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,19): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,19): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,19): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,20): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,20): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,18): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,18): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,20): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,20): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,18): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,18): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,18): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,18): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,18): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,18): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,21): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,21): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,19): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,19): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,19): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,19): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,16): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,16): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,19): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,19): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,13): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,13): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,13): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,13): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,13): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,13): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,13): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,13): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,13): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,13): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,13): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,13): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,20): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,20): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,18): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,18): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,18): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,18): error TS18050: The value 'null' cannot be used here. ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts (240 errors) ==== @@ -251,17 +251,17 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti // operator * var r1a1 = null * a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a2 = null * b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a3 = null * c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -269,31 +269,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b2 = b * null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b3 = c * null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1c1 = null * true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c2 = null * ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c3 = null * {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -301,32 +301,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1d2 = '' * null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1d3 = {} * null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator / var r2a1 = null / a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2a2 = null / b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2a3 = null / c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -334,31 +334,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b2 = b / null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b3 = c / null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2c1 = null / true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2c2 = null / ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2c3 = null / {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -366,32 +366,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2d2 = '' / null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2d3 = {} / null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator % var r3a1 = null % a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3a2 = null % b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3a3 = null % c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -399,31 +399,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b2 = b % null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b3 = c % null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3c1 = null % true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3c2 = null % ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3c3 = null % {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -431,32 +431,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3d2 = '' % null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3d3 = {} % null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator - var r4a1 = null - a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4a2 = null - b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4a3 = null - c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -464,31 +464,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b2 = b - null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b3 = c - null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4c1 = null - true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4c2 = null - ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4c3 = null - {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -496,32 +496,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4d2 = '' - null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4d3 = {} - null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator << var r5a1 = null << a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5a2 = null << b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5a3 = null << c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -529,31 +529,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r5b2 = b << null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r5b3 = c << null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r5c1 = null << true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5c2 = null << ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5c3 = null << {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -561,32 +561,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r5d2 = '' << null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r5d3 = {} << null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator >> var r6a1 = null >> a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6a2 = null >> b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6a3 = null >> c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -594,31 +594,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r6b2 = b >> null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r6b3 = c >> null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r6c1 = null >> true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6c2 = null >> ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6c3 = null >> {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -626,32 +626,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r6d2 = '' >> null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r6d3 = {} >> null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator >>> var r7a1 = null >>> a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7a2 = null >>> b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7a3 = null >>> c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -659,31 +659,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r7b2 = b >>> null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r7b3 = c >>> null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r7c1 = null >>> true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7c2 = null >>> ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7c3 = null >>> {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -691,32 +691,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r7d2 = '' >>> null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r7d3 = {} >>> null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator & var r8a1 = null & a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8a2 = null & b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8a3 = null & c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -724,31 +724,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r8b2 = b & null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r8b3 = c & null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r8c1 = null & true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8c2 = null & ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8c3 = null & {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -756,32 +756,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r8d2 = '' & null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r8d3 = {} & null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator ^ var r9a1 = null ^ a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9a2 = null ^ b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9a3 = null ^ c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -789,31 +789,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r9b2 = b ^ null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r9b3 = c ^ null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r9c1 = null ^ true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9c2 = null ^ ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9c3 = null ^ {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -821,32 +821,32 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r9d2 = '' ^ null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r9d3 = {} ^ null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator | var r10a1 = null | a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10a2 = null | b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10a3 = null | c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -854,31 +854,31 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r10b2 = b | null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r10b3 = c | null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r10c1 = null | true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10c2 = null | ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10c3 = null | {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -886,14 +886,14 @@ 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. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r10d2 = '' | null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r10d3 = {} | null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt index 426db29122452..3e6c56cd67688 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt @@ -1,83 +1,83 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(13,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(14,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(15,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(16,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(17,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(18,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(19,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(20,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(23,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(24,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(25,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(26,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(27,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(28,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(29,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(30,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(33,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(34,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(35,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(36,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(37,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(38,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(39,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(40,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(43,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(44,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(45,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(46,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(47,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(48,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(49,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(50,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(53,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(54,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(55,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(56,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(57,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(58,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(59,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(60,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(63,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(64,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(65,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(66,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(67,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(68,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(69,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(70,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(73,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(74,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(75,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(76,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(77,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(78,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(79,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(80,19): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(83,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(84,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(85,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(86,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(87,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(88,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(89,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(90,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(93,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(94,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(95,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(96,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(97,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(98,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(99,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(100,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(103,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(104,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(105,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(106,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(107,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(108,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(109,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(110,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(13,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(14,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(15,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(16,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(17,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(18,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(19,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(20,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(23,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(24,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(25,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(26,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(27,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(28,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(29,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(30,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(33,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(34,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(35,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(36,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(37,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(38,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(39,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(40,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(43,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(44,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(45,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(46,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(47,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(48,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(49,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(50,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(53,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(54,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(55,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(56,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(57,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(58,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(59,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(60,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(63,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(64,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(65,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(66,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(67,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(68,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(69,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(70,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(73,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(74,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(75,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(76,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(77,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(78,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(79,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(80,19): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(83,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(84,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(85,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(86,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(87,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(88,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(89,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(90,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(93,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(94,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(95,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(96,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(97,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(98,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(99,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(100,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(103,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(104,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(105,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(106,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(107,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(108,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(109,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(110,17): error TS18050: The value 'null' cannot be used here. ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts (80 errors) ==== @@ -95,259 +95,259 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti // operator * var ra1 = null * a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra2 = null * b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra3 = null * 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra4 = null * E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra5 = a * null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra6 = b * null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra7 = 0 * null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra8 = E.b * null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator / var rb1 = null / a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb2 = null / b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb3 = null / 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb4 = null / E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb5 = a / null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb6 = b / null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb7 = 0 / null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb8 = E.b / null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator % var rc1 = null % a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc2 = null % b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc3 = null % 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc4 = null % E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc5 = a % null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc6 = b % null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc7 = 0 % null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc8 = E.b % null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator - var rd1 = null - a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd2 = null - b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd3 = null - 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd4 = null - E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd5 = a - null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd6 = b - null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd7 = 0 - null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd8 = E.b - null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator << var re1 = null << a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re2 = null << b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re3 = null << 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re4 = null << E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re5 = a << null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re6 = b << null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re7 = 0 << null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re8 = E.b << null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator >> var rf1 = null >> a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf2 = null >> b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf3 = null >> 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf4 = null >> E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf5 = a >> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf6 = b >> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf7 = 0 >> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf8 = E.b >> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator >>> var rg1 = null >>> a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg2 = null >>> b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg3 = null >>> 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg4 = null >>> E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg5 = a >>> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg6 = b >>> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg7 = 0 >>> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg8 = E.b >>> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator & var rh1 = null & a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh2 = null & b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh3 = null & 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh4 = null & E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh5 = a & null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh6 = b & null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh7 = 0 & null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh8 = E.b & null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator ^ var ri1 = null ^ a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri2 = null ^ b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri3 = null ^ 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri4 = null ^ E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri5 = a ^ null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri6 = b ^ null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri7 = 0 ^ null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri8 = E.b ^ null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator | var rj1 = null | a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj2 = null | b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj3 = null | 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj4 = null | E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj5 = a | null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj6 = b | null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj7 = 0 | null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj8 = E.b | null; ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt index e67db44a7808e..796b6288f8194 100644 --- a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -1,302 +1,302 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,19): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,19): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,24): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,19): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,19): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,24): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,20): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,20): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,25): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,25): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,23): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,23): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,23): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,23): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,23): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,19): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,19): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,24): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,24): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,19): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,19): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,24): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,24): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,20): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,20): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,25): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,25): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,23): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,23): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,23): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts (80 errors) ==== // operator * var ra1 = null * null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra2 = null * undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra3 = undefined * null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra4 = undefined * undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator / var rb1 = null / null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb2 = null / undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rb3 = undefined / null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb4 = undefined / undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator % var rc1 = null % null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc2 = null % undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rc3 = undefined % null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc4 = undefined % undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator - var rd1 = null - null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd2 = null - undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rd3 = undefined - null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd4 = undefined - undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator << var re1 = null << null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re2 = null << undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var re3 = undefined << null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var re4 = undefined << undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator >> var rf1 = null >> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf2 = null >> undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rf3 = undefined >> null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rf4 = undefined >> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator >>> var rg1 = null >>> null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg2 = null >>> undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rg3 = undefined >>> null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rg4 = undefined >>> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator & var rh1 = null & null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh2 = null & undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rh3 = undefined & null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rh4 = undefined & undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator ^ var ri1 = null ^ null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri2 = null ^ undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ri3 = undefined ^ null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ri4 = undefined ^ undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator | var rj1 = null | null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj2 = null | undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rj3 = undefined | null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rj4 = undefined | undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt index 0482a511077e0..aad82ba30827a 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -1,243 +1,243 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,19): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,19): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,19): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,19): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,19): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,19): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,19): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,19): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,20): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,20): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,18): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,20): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,20): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,18): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,18): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,18): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,21): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,21): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,19): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,19): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,19): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,19): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,19): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,19): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,16): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,16): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,19): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,19): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,13): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,13): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,13): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,13): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,13): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,13): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,20): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,20): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,18): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,18): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts (240 errors) ==== @@ -251,17 +251,17 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti // operator * var r1a1 = undefined * a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a2 = undefined * b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a3 = undefined * c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -269,31 +269,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1b2 = b * undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1b3 = c * undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1c1 = undefined * true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c2 = undefined * ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c3 = undefined * {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -301,32 +301,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1d2 = '' * undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1d3 = {} * undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator / var r2a1 = undefined / a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2a2 = undefined / b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2a3 = undefined / c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -334,31 +334,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r2b2 = b / undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r2b3 = c / undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r2c1 = undefined / true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2c2 = undefined / ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r2c3 = undefined / {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -366,32 +366,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r2d2 = '' / undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r2d3 = {} / undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator % var r3a1 = undefined % a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3a2 = undefined % b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3a3 = undefined % c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -399,31 +399,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r3b2 = b % undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r3b3 = c % undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r3c1 = undefined % true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3c2 = undefined % ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r3c3 = undefined % {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -431,32 +431,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r3d2 = '' % undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r3d3 = {} % undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator - var r4a1 = undefined - a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4a2 = undefined - b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4a3 = undefined - c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -464,31 +464,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r4b2 = b - undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r4b3 = c - undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r4c1 = undefined - true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4c2 = undefined - ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r4c3 = undefined - {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -496,32 +496,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r4d2 = '' - undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r4d3 = {} - undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator << var r5a1 = undefined << a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5a2 = undefined << b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5a3 = undefined << c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -529,31 +529,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r5b2 = b << undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r5b3 = c << undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r5c1 = undefined << true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5c2 = undefined << ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r5c3 = undefined << {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -561,32 +561,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r5d2 = '' << undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r5d3 = {} << undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator >> var r6a1 = undefined >> a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6a2 = undefined >> b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6a3 = undefined >> c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -594,31 +594,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r6b2 = b >> undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r6b3 = c >> undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r6c1 = undefined >> true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6c2 = undefined >> ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r6c3 = undefined >> {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -626,32 +626,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r6d2 = '' >> undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r6d3 = {} >> undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator >>> var r7a1 = undefined >>> a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7a2 = undefined >>> b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7a3 = undefined >>> c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -659,31 +659,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r7b2 = b >>> undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r7b3 = c >>> undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r7c1 = undefined >>> true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7c2 = undefined >>> ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r7c3 = undefined >>> {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -691,32 +691,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r7d2 = '' >>> undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r7d3 = {} >>> undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator & var r8a1 = undefined & a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8a2 = undefined & b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8a3 = undefined & c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -724,31 +724,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r8b2 = b & undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r8b3 = c & undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r8c1 = undefined & true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8c2 = undefined & ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r8c3 = undefined & {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -756,32 +756,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r8d2 = '' & undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r8d3 = {} & undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator ^ var r9a1 = undefined ^ a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9a2 = undefined ^ b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9a3 = undefined ^ c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -789,31 +789,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r9b2 = b ^ undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r9b3 = c ^ undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r9c1 = undefined ^ true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9c2 = undefined ^ ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r9c3 = undefined ^ {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -821,32 +821,32 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r9d2 = '' ^ undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r9d3 = {} ^ undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator | var r10a1 = undefined | a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10a2 = undefined | b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10a3 = undefined | c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -854,31 +854,31 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r10b2 = b | undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r10b3 = c | undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r10c1 = undefined | true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10c2 = undefined | ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r10c3 = undefined | {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -886,14 +886,14 @@ 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. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r10d2 = '' | undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r10d3 = {} | undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt index 246b642603c76..fb0647b177fa9 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt @@ -1,83 +1,83 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(13,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(14,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(15,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(16,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(17,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(18,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(19,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(20,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(23,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(24,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(25,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(26,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(27,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(28,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(29,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(30,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(33,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(34,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(35,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(36,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(37,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(38,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(39,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(40,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(43,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(44,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(45,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(46,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(47,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(48,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(49,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(50,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(53,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(54,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(55,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(56,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(57,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(58,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(59,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(60,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(63,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(64,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(65,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(66,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(67,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(68,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(69,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(70,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(73,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(74,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(75,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(76,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(77,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(78,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(79,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(80,19): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(83,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(84,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(85,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(86,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(87,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(88,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(89,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(90,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(93,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(94,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(95,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(96,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(97,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(98,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(99,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(100,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(103,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(104,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(105,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(106,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(107,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(108,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(109,15): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(110,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(13,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(14,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(15,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(16,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(17,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(18,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(19,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(20,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(23,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(24,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(25,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(26,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(27,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(28,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(29,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(30,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(33,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(34,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(35,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(36,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(37,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(38,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(39,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(40,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(43,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(44,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(45,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(46,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(47,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(48,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(49,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(50,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(53,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(54,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(55,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(56,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(57,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(58,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(59,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(60,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(63,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(64,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(65,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(66,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(67,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(68,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(69,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(70,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(73,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(74,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(75,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(76,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(77,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(78,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(79,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(80,19): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(83,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(84,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(85,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(86,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(87,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(88,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(89,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(90,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(93,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(94,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(95,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(96,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(97,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(98,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(99,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(100,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(103,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(104,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(105,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(106,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(107,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(108,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(109,15): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(110,17): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts (80 errors) ==== @@ -95,259 +95,259 @@ tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeti // operator * var ra1 = undefined * a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra2 = undefined * b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra3 = undefined * 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra4 = undefined * E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra5 = a * undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra6 = b * undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra7 = 0 * undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra8 = E.b * undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator / var rb1 = undefined / a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rb2 = undefined / b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rb3 = undefined / 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rb4 = undefined / E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rb5 = a / undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rb6 = b / undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rb7 = 0 / undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rb8 = E.b / undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator % var rc1 = undefined % a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rc2 = undefined % b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rc3 = undefined % 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rc4 = undefined % E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rc5 = a % undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rc6 = b % undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rc7 = 0 % undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rc8 = E.b % undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator - var rd1 = undefined - a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rd2 = undefined - b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rd3 = undefined - 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rd4 = undefined - E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rd5 = a - undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rd6 = b - undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rd7 = 0 - undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rd8 = E.b - undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator << var re1 = undefined << a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var re2 = undefined << b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var re3 = undefined << 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var re4 = undefined << E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var re5 = a << undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var re6 = b << undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var re7 = 0 << undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var re8 = E.b << undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator >> var rf1 = undefined >> a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rf2 = undefined >> b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rf3 = undefined >> 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rf4 = undefined >> E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rf5 = a >> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rf6 = b >> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rf7 = 0 >> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rf8 = E.b >> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator >>> var rg1 = undefined >>> a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rg2 = undefined >>> b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rg3 = undefined >>> 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rg4 = undefined >>> E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rg5 = a >>> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rg6 = b >>> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rg7 = 0 >>> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rg8 = E.b >>> undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator & var rh1 = undefined & a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rh2 = undefined & b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rh3 = undefined & 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rh4 = undefined & E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rh5 = a & undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rh6 = b & undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rh7 = 0 & undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rh8 = E.b & undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator ^ var ri1 = undefined ^ a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ri2 = undefined ^ b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ri3 = undefined ^ 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ri4 = undefined ^ E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ri5 = a ^ undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ri6 = b ^ undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ri7 = 0 ^ undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ri8 = E.b ^ undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator | var rj1 = undefined | a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rj2 = undefined | b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rj3 = undefined | 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rj4 = undefined | E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rj5 = a | undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rj6 = b | undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rj7 = 0 | undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rj8 = E.b | undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic1.errors.txt b/tests/baselines/reference/binaryArithmatic1.errors.txt index 51c0b6498903d..2455e16533cfc 100644 --- a/tests/baselines/reference/binaryArithmatic1.errors.txt +++ b/tests/baselines/reference/binaryArithmatic1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/binaryArithmatic1.ts(1,13): error TS2531: Object is possibly 'null'. +tests/cases/compiler/binaryArithmatic1.ts(1,13): error TS18050: The value 'null' cannot be used here. ==== tests/cases/compiler/binaryArithmatic1.ts (1 errors) ==== var v = 4 | null; ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic2.errors.txt b/tests/baselines/reference/binaryArithmatic2.errors.txt index 28f379c30e213..8347beea8bae6 100644 --- a/tests/baselines/reference/binaryArithmatic2.errors.txt +++ b/tests/baselines/reference/binaryArithmatic2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/binaryArithmatic2.ts(1,13): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/binaryArithmatic2.ts(1,13): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/compiler/binaryArithmatic2.ts (1 errors) ==== var v = 4 | undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic3.errors.txt b/tests/baselines/reference/binaryArithmatic3.errors.txt index 1457407a7b83b..3dcc023338be3 100644 --- a/tests/baselines/reference/binaryArithmatic3.errors.txt +++ b/tests/baselines/reference/binaryArithmatic3.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/binaryArithmatic3.ts(1,9): error TS2532: Object is possibly 'undefined'. -tests/cases/compiler/binaryArithmatic3.ts(1,21): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/binaryArithmatic3.ts(1,9): error TS18050: The value 'undefined' cannot be used here. +tests/cases/compiler/binaryArithmatic3.ts(1,21): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/compiler/binaryArithmatic3.ts (2 errors) ==== var v = undefined | undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic4.errors.txt b/tests/baselines/reference/binaryArithmatic4.errors.txt index fe7523e0884ee..1ffada088e66d 100644 --- a/tests/baselines/reference/binaryArithmatic4.errors.txt +++ b/tests/baselines/reference/binaryArithmatic4.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/binaryArithmatic4.ts(1,9): error TS2531: Object is possibly 'null'. -tests/cases/compiler/binaryArithmatic4.ts(1,16): error TS2531: Object is possibly 'null'. +tests/cases/compiler/binaryArithmatic4.ts(1,9): error TS18050: The value 'null' cannot be used here. +tests/cases/compiler/binaryArithmatic4.ts(1,16): error TS18050: The value 'null' cannot be used here. ==== tests/cases/compiler/binaryArithmatic4.ts (2 errors) ==== var v = null | null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt index 795a9f0863dc1..1584bb06fe503 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(34,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(35,24): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(34,24): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(35,24): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(46,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(47,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(48,26): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. @@ -41,10 +41,10 @@ tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNot // any type literal var ResultIsNumber6 = ~undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ResultIsNumber7 = ~null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // any type expressions var ResultIsNumber8 = ~ANY2[0] diff --git a/tests/baselines/reference/circularOptionalityRemoval.errors.txt b/tests/baselines/reference/circularOptionalityRemoval.errors.txt index b1c55b70f04ce..1a3cad63af935 100644 --- a/tests/baselines/reference/circularOptionalityRemoval.errors.txt +++ b/tests/baselines/reference/circularOptionalityRemoval.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/circularOptionalityRemoval.ts(2,14): error TS2502: 'x' is referenced directly or indirectly in its own type annotation. tests/cases/compiler/circularOptionalityRemoval.ts(2,38): error TS2372: Parameter 'x' cannot reference itself. -tests/cases/compiler/circularOptionalityRemoval.ts(2,38): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/circularOptionalityRemoval.ts(2,38): error TS18048: 'x' is possibly 'undefined'. tests/cases/compiler/circularOptionalityRemoval.ts(2,46): error TS2372: Parameter 'x' cannot reference itself. tests/cases/compiler/circularOptionalityRemoval.ts(5,14): error TS1015: Parameter cannot have question mark and initializer. tests/cases/compiler/circularOptionalityRemoval.ts(5,14): error TS2502: 'x' is referenced directly or indirectly in its own type annotation. @@ -16,7 +16,7 @@ tests/cases/compiler/circularOptionalityRemoval.ts(5,54): error TS2372: Paramete ~ !!! error TS2372: Parameter 'x' cannot reference itself. ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'x' is possibly 'undefined'. ~ !!! error TS2372: Parameter 'x' cannot reference itself. diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalPrimitiveType.errors.txt b/tests/baselines/reference/comparisonOperatorWithIdenticalPrimitiveType.errors.txt index ad41a280aad3c..4d2d26d9cdf02 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalPrimitiveType.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalPrimitiveType.errors.txt @@ -1,19 +1,19 @@ -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(15,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(15,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(16,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(16,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(24,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(24,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(25,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(25,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(33,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(33,19): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(34,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(34,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(42,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(42,19): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(43,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(43,24): error TS2532: Object is possibly 'undefined'. +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(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(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(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) ==== @@ -33,14 +33,14 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso var ra5 = e < e; var ra6 = null < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra7 = undefined < undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator > var rb1 = a > a; @@ -50,14 +50,14 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso var rb5 = e > e; var rb6 = null > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb7 = undefined > undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator <= var rc1 = a <= a; @@ -67,14 +67,14 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso var rc5 = e <= e; var rc6 = null <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rc7 = undefined <= undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator >= var rd1 = a >= a; @@ -84,14 +84,14 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso var rd5 = e >= e; var rd6 = null >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rd7 = undefined >= undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // operator == var re1 = a == a; diff --git a/tests/baselines/reference/comparisonOperatorWithOneOperandIsNull.errors.txt b/tests/baselines/reference/comparisonOperatorWithOneOperandIsNull.errors.txt index c74ab997a5986..8f05ddfc2a4ea 100644 --- a/tests/baselines/reference/comparisonOperatorWithOneOperandIsNull.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithOneOperandIsNull.errors.txt @@ -1,67 +1,67 @@ -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(4,22): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(5,22): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(6,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(7,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(13,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(14,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(15,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(16,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(32,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(33,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(34,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(35,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(36,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(37,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(38,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(40,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(41,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(42,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(43,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(44,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(45,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(46,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(49,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(50,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(51,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(52,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(53,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(54,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(55,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(57,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(58,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(59,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(60,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(61,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(62,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(63,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(66,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(67,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(68,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(69,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(70,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(71,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(72,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(74,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(75,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(76,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(77,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(78,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(79,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(80,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(83,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(84,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(85,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(86,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(87,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(88,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(89,12): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(91,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(92,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(93,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(94,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(95,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(96,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(97,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(4,22): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(5,22): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(6,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(7,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(13,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(14,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(15,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(16,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(32,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(33,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(34,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(35,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(36,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(37,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(38,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(40,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(41,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(42,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(43,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(44,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(45,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(46,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(49,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(50,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(51,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(52,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(53,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(54,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(55,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(57,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(58,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(59,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(60,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(61,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(62,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(63,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(66,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(67,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(68,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(69,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(70,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(71,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(72,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(74,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(75,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(76,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(77,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(78,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(79,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(80,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(83,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(84,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(85,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(86,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(87,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(88,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(89,12): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(91,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(92,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(93,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(94,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(95,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(96,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts(97,17): error TS18050: The value 'null' cannot be used here. ==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts (64 errors) ==== @@ -70,16 +70,16 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso function foo(t: T) { var foo_r1 = t < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var foo_r2 = t > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var foo_r3 = t <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var foo_r4 = t >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var foo_r5 = t == null; var foo_r6 = t != null; var foo_r7 = t === null; @@ -87,16 +87,16 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso var foo_r1 = null < t; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var foo_r2 = null > t; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var foo_r3 = null <= t; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var foo_r4 = null >= t; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var foo_r5 = null == t; var foo_r6 = null != t; var foo_r7 = null === t; @@ -114,182 +114,182 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso // operator < var r1a1 = null < a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1a2 = null < b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1a3 = null < c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1a4 = null < d; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1a5 = null < e; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1a6 = null < f; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1a7 = null < g; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b1 = a < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b2 = b < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b3 = c < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b4 = d < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b5 = e < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b6 = f < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b7 = g < null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator > var r2a1 = null > a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2a2 = null > b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2a3 = null > c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2a4 = null > d; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2a5 = null > e; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2a6 = null > f; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2a7 = null > g; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b1 = a > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b2 = b > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b3 = c > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b4 = d > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b5 = e > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b6 = f > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2b7 = g > null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator <= var r3a1 = null <= a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3a2 = null <= b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3a3 = null <= c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3a4 = null <= d; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3a5 = null <= e; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3a6 = null <= f; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3a7 = null <= g; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b1 = a <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b2 = b <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b3 = c <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b4 = d <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b5 = e <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b6 = f <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3b7 = g <= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator >= var r4a1 = null >= a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4a2 = null >= b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4a3 = null >= c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4a4 = null >= d; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4a5 = null >= e; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4a6 = null >= f; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4a7 = null >= g; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b1 = a >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b2 = b >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b3 = c >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b4 = d >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b5 = e >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b6 = f >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4b7 = g >= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // operator == var r5a1 = null == a; diff --git a/tests/baselines/reference/compoundArithmeticAssignmentLHSCanBeAssigned.errors.txt b/tests/baselines/reference/compoundArithmeticAssignmentLHSCanBeAssigned.errors.txt index f438045a45f25..81a6327b51df2 100644 --- a/tests/baselines/reference/compoundArithmeticAssignmentLHSCanBeAssigned.errors.txt +++ b/tests/baselines/reference/compoundArithmeticAssignmentLHSCanBeAssigned.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(11,7): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(12,7): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(18,7): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(19,7): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(25,7): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(26,7): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(11,7): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(12,7): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(18,7): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(19,7): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(25,7): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts(26,7): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts (6 errors) ==== @@ -19,10 +19,10 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm x1 *= c; x1 *= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x1 *= undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x2: number; x2 *= a; @@ -30,10 +30,10 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm x2 *= c; x2 *= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x2 *= undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x3: E; x3 *= a; @@ -41,7 +41,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm x3 *= c; x3 *= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x3 *= undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt b/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt index dcf16a9b7cb97..46d1a705d1849 100644 --- a/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt @@ -10,9 +10,9 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(13,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(13,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(14,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(14,7): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(14,7): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(15,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(15,7): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(15,7): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(19,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(19,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -25,9 +25,9 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(24,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(24,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(25,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(25,7): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(25,7): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(26,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(26,7): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(26,7): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(29,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(30,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(30,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -40,9 +40,9 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(35,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(35,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(36,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(36,7): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(36,7): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(37,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(37,7): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(37,7): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(40,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(41,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(41,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -55,9 +55,9 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(46,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(46,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(47,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(47,7): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(47,7): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(48,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(48,7): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(48,7): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(51,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(52,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts(53,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -108,12 +108,12 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x1 *= undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x2: string; x2 *= a; @@ -149,12 +149,12 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x2 *= undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x3: {}; x3 *= a; @@ -190,12 +190,12 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x3 *= undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x4: void; x4 *= a; @@ -231,12 +231,12 @@ tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignm ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x4 *= undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x5: number; x5 *= b; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt index 4ccb502f851a3..e3709bdfc96c6 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt @@ -17,7 +17,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(40,1): error TS2630: Cannot assign to 'foo' because it is a function. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(41,1): error TS2630: Cannot assign to 'foo' because it is a function. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(44,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(44,1): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(44,1): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(45,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(46,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(47,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. @@ -160,7 +160,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. null += value; ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.errors.txt b/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.errors.txt index 26f23028dfaed..860265ad82200 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.errors.txt +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(11,8): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(12,8): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(18,8): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(19,8): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(25,8): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(26,8): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(11,8): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(12,8): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(18,8): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(19,8): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(25,8): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts(26,8): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts (6 errors) ==== @@ -19,10 +19,10 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm x1 **= c; x1 **= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x1 **= undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x2: number; x2 **= a; @@ -30,10 +30,10 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm x2 **= c; x2 **= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x2 **= undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x3: E; x3 **= a; @@ -41,7 +41,7 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm x3 **= c; x3 **= null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x3 **= undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.errors.txt b/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.errors.txt index 3c7e39fe54d17..a19fe99952be0 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.errors.txt +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.errors.txt @@ -10,9 +10,9 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(13,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(13,8): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(14,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(14,8): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(14,8): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(15,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(15,8): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(15,8): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(18,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(19,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(19,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -25,9 +25,9 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(24,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(24,8): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(25,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(25,8): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(25,8): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(26,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(26,8): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(26,8): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(29,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(30,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(30,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -40,9 +40,9 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(35,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(35,8): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(36,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(36,8): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(36,8): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(37,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(37,8): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(37,8): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(40,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(41,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(41,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -55,9 +55,9 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(46,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(46,8): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(47,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(47,8): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(47,8): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(48,1): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(48,8): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(48,8): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(51,8): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(52,8): 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/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(53,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -108,12 +108,12 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x1 **= undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x2: string; x2 **= a; @@ -149,12 +149,12 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x2 **= undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x3: {}; x3 **= a; @@ -190,12 +190,12 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x3 **= undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x4: void; x4 **= a; @@ -231,12 +231,12 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. x4 **= undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var x5: number; x5 **= b; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt index 395b39a201f64..cedf50250e3a6 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt @@ -8,7 +8,7 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(30,1): error TS2628: Cannot assign to 'E' because it is an enum. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(32,1): error TS2630: Cannot assign to 'foo' because it is a function. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(35,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(35,1): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(35,1): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(36,1): 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/compoundExponentiationAssignmentLHSIsValue.ts(37,1): 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/compoundExponentiationAssignmentLHSIsValue.ts(38,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. @@ -96,7 +96,7 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. true **= value; ~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. diff --git a/tests/baselines/reference/contextuallyTypedIifeStrict.errors.txt b/tests/baselines/reference/contextuallyTypedIifeStrict.errors.txt index 220204fc53667..461757b5a0f37 100644 --- a/tests/baselines/reference/contextuallyTypedIifeStrict.errors.txt +++ b/tests/baselines/reference/contextuallyTypedIifeStrict.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts(14,10): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts(15,10): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts(16,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts(14,10): error TS18048: 'j' is possibly 'undefined'. +tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts(15,10): error TS18048: 'k' is possibly 'undefined'. +tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts(16,17): error TS18048: 'o' is possibly 'undefined'. ==== tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts (3 errors) ==== @@ -19,13 +19,13 @@ tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts(16, // optional parameters ((j?) => j + 1)(12); ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'j' is possibly 'undefined'. ((k?) => k + 1)(); ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'k' is possibly 'undefined'. ((l, o?) => l + o)(12); // o should be any ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. // rest parameters ((...numbers) => numbers.every(n => n > 0))(5,6,7); ((...mixed) => mixed.every(n => !!n))(5,'oops','oh no'); diff --git a/tests/baselines/reference/controlFlowGenericTypes.errors.txt b/tests/baselines/reference/controlFlowGenericTypes.errors.txt index b2f1de6b88dd6..16ec73b1b4a65 100644 --- a/tests/baselines/reference/controlFlowGenericTypes.errors.txt +++ b/tests/baselines/reference/controlFlowGenericTypes.errors.txt @@ -5,9 +5,9 @@ tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(81,11): error TS2 tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(90,44): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(91,11): error TS2339: Property 'foo' does not exist on type 'MyUnion'. Property 'foo' does not exist on type 'AA'. -tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(156,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(167,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(168,9): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(156,16): error TS18048: 'obj' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(167,9): error TS18048: 'iSpec' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(168,9): error TS18048: 'iSpec' is possibly 'undefined'. ==== tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts (8 errors) ==== @@ -180,7 +180,7 @@ tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(168,9): error TS2 function fx3 | undefined, K extends keyof T>(obj: T, key: K) { const x1 = obj[key]; // Error ~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'obj' is possibly 'undefined'. const x2 = obj && obj[key]; } @@ -193,10 +193,10 @@ tests/cases/conformance/controlFlow/controlFlowGenericTypes.ts(168,9): error TS2 let iSpec = null! as InternalSpec; iSpec[null! as keyof InternalSpec]; // Error, object possibly undefined ~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'iSpec' is possibly 'undefined'. iSpec[null! as keyof PublicSpec]; // Error, object possibly undefined ~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'iSpec' is possibly 'undefined'. if (iSpec === undefined) { return; } diff --git a/tests/baselines/reference/controlFlowOptionalChain.errors.txt b/tests/baselines/reference/controlFlowOptionalChain.errors.txt index 1dfe8e9e328a0..d73767596f6f7 100644 --- a/tests/baselines/reference/controlFlowOptionalChain.errors.txt +++ b/tests/baselines/reference/controlFlowOptionalChain.errors.txt @@ -4,61 +4,61 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(18,1): error TS2 tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(22,1): error TS2454: Variable 'd' is used before being assigned. tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(35,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(39,1): error TS2722: Cannot invoke an object which is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(52,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(57,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(68,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(72,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(83,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(87,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(104,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(105,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(105,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(111,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(112,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(112,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(130,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(134,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(208,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(211,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(214,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(217,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(220,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(223,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(238,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(241,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(244,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(271,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(274,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(277,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(307,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(310,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(319,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(322,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(331,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(334,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(337,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(340,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(343,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(346,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(349,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(352,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(358,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(367,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(370,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(379,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(418,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(421,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(430,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(433,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(442,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(451,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(454,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(463,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(498,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(501,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(515,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(518,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(52,5): error TS18048: 'o2' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(57,1): error TS18048: 'o2' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(68,5): error TS18048: 'o3' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(72,1): error TS18048: 'o3' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(83,5): error TS18048: 'o4.x' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(87,1): error TS18048: 'o4.x' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(104,5): error TS18048: 'o5.x' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(105,5): error TS18048: 'o5.x' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(105,5): error TS18048: 'o5.x.y.z' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(111,1): error TS18048: 'o5.x' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(112,1): error TS18048: 'o5.x' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(112,1): error TS18048: 'o5.x.y.z' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(130,5): error TS18048: 'o6' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(134,1): error TS18048: 'o6' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(208,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(211,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(214,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(217,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(220,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(223,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(238,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(241,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(244,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(271,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(274,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(277,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(307,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(310,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(319,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(322,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(331,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(334,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(337,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(340,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(343,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(346,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(349,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(352,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(358,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(367,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(370,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(379,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(418,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(421,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(430,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(433,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(442,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(451,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(454,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(463,9): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(498,13): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(501,13): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(515,13): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(518,13): error TS18048: 'o' is possibly 'undefined'. +tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error TS18048: 'someOptionalObject' is possibly 'undefined'. ==== tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts (61 errors) ==== @@ -127,14 +127,14 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T o2?.f; o2.f; ~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o2' is possibly 'undefined'. } x; o2; o2?.f; o2.f; ~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o2' is possibly 'undefined'. declare const o3: { x: 1, y: string } | { x: 2, y: number } | undefined; if (o3?.x === 1) { @@ -147,13 +147,13 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T o3?.x; o3.x; ~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o3' is possibly 'undefined'. } o3; o3?.x; o3.x; ~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o3' is possibly 'undefined'. declare const o4: { x?: { y: boolean } }; if (o4.x?.y) { @@ -166,13 +166,13 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T o4.x?.y; o4.x.y; ~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o4.x' is possibly 'undefined'. } o4.x; o4.x?.y; o4.x.y; ~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o4.x' is possibly 'undefined'. declare const o5: { x?: { y: { z?: { w: boolean } } } }; if (o5.x?.y.z?.w) { @@ -191,12 +191,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T o5.x?.y.z?.w; o5.x.y; ~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o5.x' is possibly 'undefined'. o5.x.y.z.w; ~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o5.x' is possibly 'undefined'. ~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o5.x.y.z' is possibly 'undefined'. } o5.x; o5.x?.y; @@ -204,12 +204,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T o5.x?.y.z?.w; o5.x.y; ~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o5.x' is possibly 'undefined'. o5.x.y.z.w; ~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o5.x' is possibly 'undefined'. ~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o5.x.y.z' is possibly 'undefined'. interface Base { f(): this is Derived; @@ -229,13 +229,13 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T o6?.f; o6.f; ~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o6' is possibly 'undefined'. } o6; o6?.f; o6.f; ~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o6' is possibly 'undefined'. // asserts declare const isDefined: (value: T) => asserts value is NonNullable; @@ -311,32 +311,32 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T if (o?.foo === value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.["foo"] === value) { o["foo"]; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.bar() === value) { o.bar; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.foo == value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.["foo"] == value) { o["foo"]; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.bar() == value) { o.bar; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } } @@ -353,17 +353,17 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T if (o?.foo == value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.["foo"] == value) { o["foo"]; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.bar() == value) { o.bar; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } } @@ -392,17 +392,17 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T if (o?.foo !== null) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.["foo"] !== null) { o["foo"]; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.bar() !== null) { o.bar; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.foo != null) { o.foo; @@ -434,12 +434,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.foo !== value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; @@ -450,12 +450,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.foo != value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; @@ -466,42 +466,42 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T if (o?.foo === value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.foo !== value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.foo == value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.foo != value) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } } @@ -509,7 +509,7 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T if (o?.foo === undefined) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; @@ -520,12 +520,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (o?.foo == undefined) { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; @@ -536,7 +536,7 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } } @@ -577,12 +577,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (typeof o?.foo !== "number") { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; @@ -593,12 +593,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (typeof o?.foo != "number") { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; @@ -609,7 +609,7 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T if (typeof o?.foo === "undefined") { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; @@ -620,12 +620,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } if (typeof o?.foo == "undefined") { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } else { o.foo; @@ -636,7 +636,7 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T else { o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. } } @@ -673,12 +673,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T case undefined: o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. break; default: o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. break; } } @@ -694,12 +694,12 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T case "undefined": o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. break; default: o.foo; // Error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'o' is possibly 'undefined'. break; } } @@ -750,7 +750,7 @@ tests/cases/conformance/controlFlow/controlFlowOptionalChain.ts(567,21): error T console.log(someOptionalObject); console.log(someOptionalObject.someProperty); // Error ~~~~~~~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'someOptionalObject' is possibly 'undefined'. lastSomeProperty = someOptionalObject?.someProperty; } } diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt index fd33f7fa749b6..8e5e80bf35593 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt @@ -10,10 +10,10 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(34,24): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(37,26): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2357: The operand of an increment or decrement operator must be a variable or a property access. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(39,26): error TS2539: Cannot assign to 'undefined' because it is not a variable. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2357: The operand of an increment or decrement operator must be a variable or a property access. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(42,24): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(43,24): error TS2539: Cannot assign to 'undefined' because it is not a variable. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(46,26): error TS2357: The operand of an increment or decrement operator must be a variable or a property access. @@ -116,7 +116,7 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp ~~~~ !!! error TS2357: The operand of an increment or decrement operator must be a variable or a property access. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ResultIsNumber13 = --undefined; ~~~~~~~~~ !!! error TS2539: Cannot assign to 'undefined' because it is not a variable. @@ -125,7 +125,7 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp ~~~~ !!! error TS2357: The operand of an increment or decrement operator must be a variable or a property access. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ResultIsNumber15 = {}--; ~~ !!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. diff --git a/tests/baselines/reference/destructuringControlFlow.errors.txt b/tests/baselines/reference/destructuringControlFlow.errors.txt index e83a76942f096..a100ff4b43e0e 100644 --- a/tests/baselines/reference/destructuringControlFlow.errors.txt +++ b/tests/baselines/reference/destructuringControlFlow.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(31,8): error TS2339: Property 'x' does not exist on type 'Number'. tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(32,9): error TS2339: Property 'x' does not exist on type 'Number'. tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(33,9): error TS2537: Type 'Number' has no matching index signature for type 'string'. -tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(40,1): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(40,1): error TS18048: 'value' is possibly 'undefined'. ==== tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts (4 errors) ==== @@ -52,5 +52,5 @@ tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(40,1): err let [key, value]: KeyValue = ["foo"]; value.toUpperCase(); // Error ~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'value' is possibly 'undefined'. \ No newline at end of file diff --git a/tests/baselines/reference/equalityStrictNulls.errors.txt b/tests/baselines/reference/equalityStrictNulls.errors.txt index 88694f5dddd83..dbb60e7384cdd 100644 --- a/tests/baselines/reference/equalityStrictNulls.errors.txt +++ b/tests/baselines/reference/equalityStrictNulls.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts(59,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts(61,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts(63,14): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts(65,14): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts(59,13): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts(61,13): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts(63,14): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts(65,14): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts (4 errors) ==== @@ -65,19 +65,19 @@ tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.t function f4(x: number) { if (x > undefined) { ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. } if (x < undefined) { ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. } if (x >= undefined) { ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. } if (x <= undefined) { ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. } } function f5(x: string) { diff --git a/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.errors.txt index c96576f7ecc7c..b83156f9af219 100644 --- a/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.errors.txt @@ -1,27 +1,27 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(9,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(9,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(9,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/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(10,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(10,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(10,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/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(11,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(11,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(11,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/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(13,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/exponentiationOperatorWithNullValueAndInvalidOperands.ts(13,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(13,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(14,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/exponentiationOperatorWithNullValueAndInvalidOperands.ts(14,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(14,17): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(15,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/exponentiationOperatorWithNullValueAndInvalidOperands.ts(15,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(17,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(15,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(17,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(17,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/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(18,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(18,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(18,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/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(19,12): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(19,12): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(19,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/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.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/exponentiationOperatorWithNullValueAndInvalidOperands.ts(21,20): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(21,20): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.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/exponentiationOperatorWithNullValueAndInvalidOperands.ts(22,18): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(22,18): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(23,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/exponentiationOperatorWithNullValueAndInvalidOperands.ts(23,18): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(23,18): error TS18050: The value 'null' cannot be used here. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts (24 errors) ==== @@ -35,17 +35,17 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNul // operator ** var r1a1 = null ** a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a2 = null ** b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a3 = null ** c; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -53,31 +53,31 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNul ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b2 = b ** null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1b3 = c ** null; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1c1 = null ** true; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c2 = null ** ''; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c3 = null ** {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -85,14 +85,14 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNul ~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1d2 = '' ** null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r1d3 = {} ** null; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.errors.txt index c8a462c0f547b..ef0589b850f5e 100644 --- a/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(13,10): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(14,10): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(15,10): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(16,10): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(17,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(18,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(19,15): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(20,17): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(13,10): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(14,10): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(15,10): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(16,10): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(17,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(18,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(19,15): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts(20,17): error TS18050: The value 'null' cannot be used here. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts (8 errors) ==== @@ -23,25 +23,25 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNul // operator ** var r1 = null ** a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2 = null ** b; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r3 = null ** 1; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4 = null ** E.a; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r5 = a ** null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r6 = b ** null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r7 = 0 ** null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r8 = E.b ** null; ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.errors.txt index 20b004625ca0c..7110dce3a12b5 100644 --- a/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -1,33 +1,33 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(2,10): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(2,18): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(3,10): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(3,18): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(4,10): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(4,23): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(5,10): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(5,23): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(2,10): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(2,18): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(3,10): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(3,18): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(4,10): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(4,23): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(5,10): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(5,23): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts (8 errors) ==== // operator ** var r1 = null ** null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r2 = null ** undefined; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r3 = undefined ** null; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var r4 = undefined ** undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.errors.txt index a0fa243e5680d..45eb659ade578 100644 --- a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -1,27 +1,27 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(9,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(9,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(9,25): 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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(10,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(10,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(10,25): 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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(11,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(11,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(11,25): 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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(13,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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(13,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(13,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(14,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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(14,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(14,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(15,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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(15,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(17,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(15,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(17,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(17,25): 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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(18,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(18,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(18,25): 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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(19,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(19,12): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(19,25): 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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(21,20): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(21,20): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(22,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(22,18): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(23,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/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(23,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(23,18): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts (24 errors) ==== @@ -35,17 +35,17 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUnd // operator ** var r1a1 = undefined ** a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a2 = undefined ** b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1a3 = undefined ** c; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -53,31 +53,31 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUnd ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1b2 = b ** undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1b3 = c ** undefined; ~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1c1 = undefined ** true; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c2 = undefined ** ''; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. var r1c3 = undefined ** {}; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -85,14 +85,14 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUnd ~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1d2 = '' ** undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var r1d3 = {} ** undefined; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.errors.txt index ce9843a96129e..c8c2244d9c8af 100644 --- a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(13,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(14,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(15,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(16,11): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(17,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(18,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(19,16): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(20,18): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(13,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(14,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(15,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(16,11): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(17,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(18,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(19,16): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts(20,18): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts (8 errors) ==== @@ -23,25 +23,25 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUnd // operator * var rk1 = undefined ** a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rk2 = undefined ** b; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rk3 = undefined ** 1; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rk4 = undefined ** E.a; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rk5 = a ** undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rk6 = b ** undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rk7 = 0 ** undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var rk8 = E.b ** undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/forInStrictNullChecksNoError.errors.txt b/tests/baselines/reference/forInStrictNullChecksNoError.errors.txt index fd6bd4c8d8f8a..68e60dcec3da5 100644 --- a/tests/baselines/reference/forInStrictNullChecksNoError.errors.txt +++ b/tests/baselines/reference/forInStrictNullChecksNoError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/forInStrictNullChecksNoError.ts(5,5): error TS2533: Object is possibly 'null' or 'undefined'. +tests/cases/compiler/forInStrictNullChecksNoError.ts(5,5): error TS18049: 'x' is possibly 'null' or 'undefined'. ==== tests/cases/compiler/forInStrictNullChecksNoError.ts (1 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/forInStrictNullChecksNoError.ts(5,5): error TS2533: Object } x["no"]; // should still error ~ -!!! error TS2533: Object is possibly 'null' or 'undefined'. +!!! error TS18049: 'x' is possibly 'null' or 'undefined'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt index e494e6593a005..efbdcb8290c56 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(1,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(99,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(104,16): error TS2378: A 'get' accessor must return a value. -tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(126,15): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(126,15): error TS18050: The value 'undefined' cannot be used here. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(127,5): error TS1003: Identifier expected. @@ -139,7 +139,7 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(127,5): e throw null; throw undefined. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. } ~ !!! error TS1003: Identifier expected. diff --git a/tests/baselines/reference/implicitConstParameters.errors.txt b/tests/baselines/reference/implicitConstParameters.errors.txt index 101f1d35dd107..b18ca017585fe 100644 --- a/tests/baselines/reference/implicitConstParameters.errors.txt +++ b/tests/baselines/reference/implicitConstParameters.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/implicitConstParameters.ts(38,27): error TS2532: Object is possibly 'undefined'. -tests/cases/compiler/implicitConstParameters.ts(44,27): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/implicitConstParameters.ts(38,27): error TS18048: 'x' is possibly 'undefined'. +tests/cases/compiler/implicitConstParameters.ts(44,27): error TS18048: 'x' is possibly 'undefined'. ==== tests/cases/compiler/implicitConstParameters.ts (2 errors) ==== @@ -42,7 +42,7 @@ tests/cases/compiler/implicitConstParameters.ts(44,27): error TS2532: Object is if (x) { doSomething(() => x.length); ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'x' is possibly 'undefined'. } } @@ -50,7 +50,7 @@ tests/cases/compiler/implicitConstParameters.ts(44,27): error TS2532: Object is if (x) { doSomething(() => x.length); ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'x' is possibly 'undefined'. } x = "abc"; // causes x to be considered non-const } diff --git a/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt index 7984645b6d648..6b47a8b16749b 100644 --- a/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt @@ -1,8 +1,8 @@ tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(15,11): error TS2360: The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(16,11): error TS2360: The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(17,11): error TS2360: The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'. -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(19,11): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(20,11): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(19,11): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(20,11): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(22,11): error TS2360: The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(23,11): error TS2360: The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(24,12): error TS2360: The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'. @@ -15,8 +15,8 @@ tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInv tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(40,16): error TS2361: The right-hand side of an 'in' expression must not be a primitive. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(41,16): error TS2361: The right-hand side of an 'in' expression must not be a primitive. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(42,16): error TS2361: The right-hand side of an 'in' expression must not be a primitive. -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(43,16): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(44,17): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(43,16): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(44,17): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(47,11): error TS2360: The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(47,17): error TS2361: The right-hand side of an 'in' expression must not be a primitive. @@ -48,10 +48,10 @@ tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInv var ra4 = a4 in x; var ra5 = null in x; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ra6 = undefined in x; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ra7 = E.a in x; var ra8 = false in x; ~~~~~ @@ -100,10 +100,10 @@ tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInv !!! error TS2361: The right-hand side of an 'in' expression must not be a primitive. var rb9 = x in null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var rb10 = x in undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // both operands are invalid var rc1 = {} in ''; diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt index 953067effca73..75336e8de2b36 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt @@ -10,10 +10,10 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(34,24): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(37,26): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2357: The operand of an increment or decrement operator must be a variable or a property access. -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(39,26): error TS2539: Cannot assign to 'undefined' because it is not a variable. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2357: The operand of an increment or decrement operator must be a variable or a property access. -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(42,24): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(43,24): error TS2539: Cannot assign to 'undefined' because it is not a variable. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(46,26): error TS2357: The operand of an increment or decrement operator must be a variable or a property access. @@ -111,7 +111,7 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp ~~~~ !!! error TS2357: The operand of an increment or decrement operator must be a variable or a property access. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ResultIsNumber13 = ++undefined; ~~~~~~~~~ !!! error TS2539: Cannot assign to 'undefined' because it is not a variable. @@ -120,7 +120,7 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp ~~~~ !!! error TS2357: The operand of an increment or decrement operator must be a variable or a property access. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var ResultIsNumber15 = {}++; ~~ !!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. diff --git a/tests/baselines/reference/literals.errors.txt b/tests/baselines/reference/literals.errors.txt index 426e832c62227..8f846c9cb3354 100644 --- a/tests/baselines/reference/literals.errors.txt +++ b/tests/baselines/reference/literals.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/expressions/literals/literals.ts(8,10): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/literals/literals.ts(8,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/literals/literals.ts(9,9): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/literals/literals.ts(9,21): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/literals/literals.ts(8,10): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/literals/literals.ts(8,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/literals/literals.ts(9,9): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/literals/literals.ts(9,21): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/literals/literals.ts(19,9): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. tests/cases/conformance/expressions/literals/literals.ts(24,9): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o3'. @@ -16,14 +16,14 @@ tests/cases/conformance/expressions/literals/literals.ts(24,9): error TS1085: Oc var nu = null / null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var u = undefined / undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var b: boolean; var b = true; diff --git a/tests/baselines/reference/logicalAssignment4(target=es2015).errors.txt b/tests/baselines/reference/logicalAssignment4(target=es2015).errors.txt index 3734386b4d3ff..dad1dbd2b1b99 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2015).errors.txt +++ b/tests/baselines/reference/logicalAssignment4(target=es2015).errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS18048: 'defaultValue' is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS18048: 'defaultValue' is possibly 'undefined'. ==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts (2 errors) ==== @@ -43,7 +43,7 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): e thing.name; defaultValue.name; ~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'defaultValue' is possibly 'undefined'. } } else { @@ -51,7 +51,7 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): e thing.name; defaultValue.name; ~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'defaultValue' is possibly 'undefined'. } } } diff --git a/tests/baselines/reference/logicalAssignment4(target=es2020).errors.txt b/tests/baselines/reference/logicalAssignment4(target=es2020).errors.txt index 3734386b4d3ff..dad1dbd2b1b99 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2020).errors.txt +++ b/tests/baselines/reference/logicalAssignment4(target=es2020).errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS18048: 'defaultValue' is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS18048: 'defaultValue' is possibly 'undefined'. ==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts (2 errors) ==== @@ -43,7 +43,7 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): e thing.name; defaultValue.name; ~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'defaultValue' is possibly 'undefined'. } } else { @@ -51,7 +51,7 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): e thing.name; defaultValue.name; ~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'defaultValue' is possibly 'undefined'. } } } diff --git a/tests/baselines/reference/logicalAssignment4(target=es2021).errors.txt b/tests/baselines/reference/logicalAssignment4(target=es2021).errors.txt index 3734386b4d3ff..dad1dbd2b1b99 100644 --- a/tests/baselines/reference/logicalAssignment4(target=es2021).errors.txt +++ b/tests/baselines/reference/logicalAssignment4(target=es2021).errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS18048: 'defaultValue' is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS18048: 'defaultValue' is possibly 'undefined'. ==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts (2 errors) ==== @@ -43,7 +43,7 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): e thing.name; defaultValue.name; ~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'defaultValue' is possibly 'undefined'. } } else { @@ -51,7 +51,7 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): e thing.name; defaultValue.name; ~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'defaultValue' is possibly 'undefined'. } } } diff --git a/tests/baselines/reference/logicalAssignment4(target=esnext).errors.txt b/tests/baselines/reference/logicalAssignment4(target=esnext).errors.txt index 3734386b4d3ff..dad1dbd2b1b99 100644 --- a/tests/baselines/reference/logicalAssignment4(target=esnext).errors.txt +++ b/tests/baselines/reference/logicalAssignment4(target=esnext).errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(39,13): error TS18048: 'defaultValue' is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): error TS18048: 'defaultValue' is possibly 'undefined'. ==== tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts (2 errors) ==== @@ -43,7 +43,7 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): e thing.name; defaultValue.name; ~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'defaultValue' is possibly 'undefined'. } } else { @@ -51,7 +51,7 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment4.ts(45,13): e thing.name; defaultValue.name; ~~~~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'defaultValue' is possibly 'undefined'. } } } diff --git a/tests/baselines/reference/logicalAssignment5(target=es2015).errors.txt b/tests/baselines/reference/logicalAssignment5(target=es2015).errors.txt index 4cebb69c82120..7a62acfaee6a2 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2015).errors.txt +++ b/tests/baselines/reference/logicalAssignment5(target=es2015).errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS18048: 'f' is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS18048: 'f' is possibly 'undefined'. tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. @@ -25,14 +25,14 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): er function bar1 (f?: (a: number) => void) { f ??= (f.toString(), (a => a)) ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'f' is possibly 'undefined'. f(42) } function bar2 (f?: (a: number) => void) { f ||= (f.toString(), (a => a)) ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'f' is possibly 'undefined'. f(42) } diff --git a/tests/baselines/reference/logicalAssignment5(target=es2020).errors.txt b/tests/baselines/reference/logicalAssignment5(target=es2020).errors.txt index 4cebb69c82120..7a62acfaee6a2 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2020).errors.txt +++ b/tests/baselines/reference/logicalAssignment5(target=es2020).errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS18048: 'f' is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS18048: 'f' is possibly 'undefined'. tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. @@ -25,14 +25,14 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): er function bar1 (f?: (a: number) => void) { f ??= (f.toString(), (a => a)) ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'f' is possibly 'undefined'. f(42) } function bar2 (f?: (a: number) => void) { f ||= (f.toString(), (a => a)) ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'f' is possibly 'undefined'. f(42) } diff --git a/tests/baselines/reference/logicalAssignment5(target=es2021).errors.txt b/tests/baselines/reference/logicalAssignment5(target=es2021).errors.txt index 4cebb69c82120..7a62acfaee6a2 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2021).errors.txt +++ b/tests/baselines/reference/logicalAssignment5(target=es2021).errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS18048: 'f' is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS18048: 'f' is possibly 'undefined'. tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. @@ -25,14 +25,14 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): er function bar1 (f?: (a: number) => void) { f ??= (f.toString(), (a => a)) ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'f' is possibly 'undefined'. f(42) } function bar2 (f?: (a: number) => void) { f ||= (f.toString(), (a => a)) ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'f' is possibly 'undefined'. f(42) } diff --git a/tests/baselines/reference/logicalAssignment5(target=esnext).errors.txt b/tests/baselines/reference/logicalAssignment5(target=esnext).errors.txt index 4cebb69c82120..7a62acfaee6a2 100644 --- a/tests/baselines/reference/logicalAssignment5(target=esnext).errors.txt +++ b/tests/baselines/reference/logicalAssignment5(target=esnext).errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(13,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(17,12): error TS18048: 'f' is possibly 'undefined'. +tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(22,12): error TS18048: 'f' is possibly 'undefined'. tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): error TS2722: Cannot invoke an object which is possibly 'undefined'. @@ -25,14 +25,14 @@ tests/cases/conformance/es2021/logicalAssignment/logicalAssignment5.ts(28,5): er function bar1 (f?: (a: number) => void) { f ??= (f.toString(), (a => a)) ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'f' is possibly 'undefined'. f(42) } function bar2 (f?: (a: number) => void) { f ||= (f.toString(), (a => a)) ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'f' is possibly 'undefined'. f(42) } diff --git a/tests/baselines/reference/moduleVariableArrayIndexer.errors.txt b/tests/baselines/reference/moduleVariableArrayIndexer.errors.txt index f0c070375f64f..1e7827bf3451a 100644 --- a/tests/baselines/reference/moduleVariableArrayIndexer.errors.txt +++ b/tests/baselines/reference/moduleVariableArrayIndexer.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/moduleVariableArrayIndexer.ts(3,13): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/moduleVariableArrayIndexer.ts(3,13): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/compiler/moduleVariableArrayIndexer.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/moduleVariableArrayIndexer.ts(3,13): error TS2532: Object i export var a = 1; var t = undefined[a][a]; // CG: var t = undefined[Bar.a][a]; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. } \ No newline at end of file diff --git a/tests/baselines/reference/narrowingTruthyObject.errors.txt b/tests/baselines/reference/narrowingTruthyObject.errors.txt index 793e2fa5200cb..401116d2acb96 100644 --- a/tests/baselines/reference/narrowingTruthyObject.errors.txt +++ b/tests/baselines/reference/narrowingTruthyObject.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/narrowingTruthyObject.ts(3,9): error TS2531: Object is possibly 'null'. +tests/cases/compiler/narrowingTruthyObject.ts(3,9): error TS18047: 'x' is possibly 'null'. ==== tests/cases/compiler/narrowingTruthyObject.ts (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/compiler/narrowingTruthyObject.ts(3,9): error TS2531: Object is poss if (typeof x === 'object') { x.toString(); ~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18047: 'x' is possibly 'null'. } if (typeof x === 'object' && x) { x.toString(); diff --git a/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt b/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt index 0792565f063ed..842c8b7ffa617 100644 --- a/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt @@ -1,12 +1,12 @@ tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(4,25): error TS1005: ',' expected. tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(4,26): error TS1109: Expression expected. -tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(7,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(7,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(8,17): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(8,24): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(9,17): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(9,29): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(7,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(7,24): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(8,17): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(8,24): error TS18050: The value 'null' cannot be used here. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(9,17): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(9,29): error TS18050: The value 'undefined' cannot be used here. tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts(12,14): error TS1109: Expression expected. @@ -26,19 +26,19 @@ tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperator // invalid expressions var NUMBER2 = -(null - undefined); ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var NUMBER3 = -(null - null); ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. var NUMBER4 = -(undefined - undefined); ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. // miss operand var NUMBER =-; diff --git a/tests/baselines/reference/negateOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/negateOperatorWithAnyOtherType.errors.txt index 0fbf89fb7ec05..0db2e697af713 100644 --- a/tests/baselines/reference/negateOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/negateOperatorWithAnyOtherType.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts(34,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts(35,23): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts(34,24): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts(35,23): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts(51,1): error TS2695: Left side of comma operator is unused and has no side effects. @@ -39,10 +39,10 @@ tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperator // any type literal var ResultIsNumber7 = -undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ResultIsNumber = -null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // any type expressions var ResultIsNumber8 = -ANY2[0]; diff --git a/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.errors.txt b/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.errors.txt index 752d59d0831e2..b40d001a55343 100644 --- a/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.errors.txt +++ b/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.errors.txt @@ -1,17 +1,18 @@ -tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(8,1): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(8,1): error TS18048: 's1' is possibly 'undefined'. tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(12,9): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'string'. tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(16,9): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'string'. -tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(23,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(26,1): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(34,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(41,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(50,2): error TS2322: Type 'string | undefined' is not assignable to type 'string'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(23,1): error TS18048: 't1' is possibly 'undefined'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(26,1): error TS18048: 't2.z' is possibly 'undefined'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(34,5): error TS18048: 'z' is possibly 'undefined'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(41,5): error TS18048: 'q.z' is possibly 'undefined'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(52,5): error TS18048: 'q.z' is possibly 'undefined'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(62,2): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(59,8): error TS2322: Type 'number | undefined' is not assignable to type 'number'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(71,8): error TS2322: Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. -==== tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts (9 errors) ==== +==== tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts (10 errors) ==== declare const strArray: string[]; declare const strStrTuple: [string, string]; @@ -21,7 +22,7 @@ tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(59,8): const [s1] = strArray; s1.toString(); // Should error, s1 possibly undefined ~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 's1' is possibly 'undefined'. // Destructuring a rest element -> do not include undefined const [...s2] = strArray; @@ -42,12 +43,12 @@ tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(59,8): const { t1 } = strMap; t1.toString(); // Should error, t1 possibly undefined ~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 't1' is possibly 'undefined'. const { ...t2 } = strMap; t2.z.toString(); // Should error ~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 't2.z' is possibly 'undefined'. // Test intersections with declared properties declare const numMapPoint: { x: number, y: number} & { [s: string]: number }; @@ -57,7 +58,7 @@ tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(59,8): y.toFixed(); // Should OK z.toFixed(); // Should error ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'z' is possibly 'undefined'. } { @@ -66,7 +67,22 @@ tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts(59,8): q.y.toFixed(); // Should OK q.z.toFixed(); // Should error ~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'q.z' is possibly 'undefined'. + } + + { + const { x, ...q } = numMapPoint; + x. + toFixed(); // Should OK + + q. + y.toFixed(); // Should OK + + q. + ~~ + z.toFixed(); // Should error + ~~~~~ +!!! error TS18048: 'q.z' is possibly 'undefined'. } diff --git a/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.js b/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.js index fd097ecfc5536..820ca2ac895b0 100644 --- a/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.js +++ b/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.js @@ -42,6 +42,18 @@ declare const numMapPoint: { x: number, y: number} & { [s: string]: number }; q.z.toFixed(); // Should error } +{ + const { x, ...q } = numMapPoint; + x. + toFixed(); // Should OK + + q. + y.toFixed(); // Should OK + + q. + z.toFixed(); // Should error +} + declare let target_string: string; declare let target_string_undef: string | undefined; @@ -100,6 +112,15 @@ t2.z.toString(); // Should error q.y.toFixed(); // Should OK q.z.toFixed(); // Should error } +{ + var x = numMapPoint.x, q = __rest(numMapPoint, ["x"]); + x. + toFixed(); // Should OK + q. + y.toFixed(); // Should OK + q. + z.toFixed(); // Should error +} // Assignment forms target_string = strArray[0]; // Should error target_string_undef = strArray[0]; // Should OK diff --git a/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.symbols b/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.symbols index fb168915d7bd4..8135fb3dca7de 100644 --- a/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.symbols +++ b/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.symbols @@ -116,46 +116,76 @@ declare const numMapPoint: { x: number, y: number} & { [s: string]: number }; >toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) } +{ + const { x, ...q } = numMapPoint; +>x : Symbol(x, Decl(noUncheckedIndexedAccessDestructuring.ts, 44, 11)) +>q : Symbol(q, Decl(noUncheckedIndexedAccessDestructuring.ts, 44, 14)) +>numMapPoint : Symbol(numMapPoint, Decl(noUncheckedIndexedAccessDestructuring.ts, 28, 13)) + + x. +>x. toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(noUncheckedIndexedAccessDestructuring.ts, 44, 11)) + + toFixed(); // Should OK +>toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) + + q. +>q. y.toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) +>q. y : Symbol(y, Decl(noUncheckedIndexedAccessDestructuring.ts, 28, 39)) +>q : Symbol(q, Decl(noUncheckedIndexedAccessDestructuring.ts, 44, 14)) + + y.toFixed(); // Should OK +>y : Symbol(y, Decl(noUncheckedIndexedAccessDestructuring.ts, 28, 39)) +>toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) + + q. +>q. z.toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) +>q : Symbol(q, Decl(noUncheckedIndexedAccessDestructuring.ts, 44, 14)) + + z.toFixed(); // Should error +>toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) +} + declare let target_string: string; ->target_string : Symbol(target_string, Decl(noUncheckedIndexedAccessDestructuring.ts, 44, 11)) +>target_string : Symbol(target_string, Decl(noUncheckedIndexedAccessDestructuring.ts, 56, 11)) declare let target_string_undef: string | undefined; ->target_string_undef : Symbol(target_string_undef, Decl(noUncheckedIndexedAccessDestructuring.ts, 45, 11)) +>target_string_undef : Symbol(target_string_undef, Decl(noUncheckedIndexedAccessDestructuring.ts, 57, 11)) declare let target_string_arr: string[]; ->target_string_arr : Symbol(target_string_arr, Decl(noUncheckedIndexedAccessDestructuring.ts, 46, 11)) +>target_string_arr : Symbol(target_string_arr, Decl(noUncheckedIndexedAccessDestructuring.ts, 58, 11)) // Assignment forms [target_string] = strArray; // Should error ->target_string : Symbol(target_string, Decl(noUncheckedIndexedAccessDestructuring.ts, 44, 11)) +>target_string : Symbol(target_string, Decl(noUncheckedIndexedAccessDestructuring.ts, 56, 11)) >strArray : Symbol(strArray, Decl(noUncheckedIndexedAccessDestructuring.ts, 0, 13)) [target_string_undef] = strArray; // Should OK ->target_string_undef : Symbol(target_string_undef, Decl(noUncheckedIndexedAccessDestructuring.ts, 45, 11)) +>target_string_undef : Symbol(target_string_undef, Decl(noUncheckedIndexedAccessDestructuring.ts, 57, 11)) >strArray : Symbol(strArray, Decl(noUncheckedIndexedAccessDestructuring.ts, 0, 13)) [,,, ...target_string_arr] = strArray; // Should OK ->target_string_arr : Symbol(target_string_arr, Decl(noUncheckedIndexedAccessDestructuring.ts, 46, 11)) +>target_string_arr : Symbol(target_string_arr, Decl(noUncheckedIndexedAccessDestructuring.ts, 58, 11)) >strArray : Symbol(strArray, Decl(noUncheckedIndexedAccessDestructuring.ts, 0, 13)) { let x: number, y: number, z: number | undefined; ->x : Symbol(x, Decl(noUncheckedIndexedAccessDestructuring.ts, 54, 7)) ->y : Symbol(y, Decl(noUncheckedIndexedAccessDestructuring.ts, 54, 18)) ->z : Symbol(z, Decl(noUncheckedIndexedAccessDestructuring.ts, 54, 29)) +>x : Symbol(x, Decl(noUncheckedIndexedAccessDestructuring.ts, 66, 7)) +>y : Symbol(y, Decl(noUncheckedIndexedAccessDestructuring.ts, 66, 18)) +>z : Symbol(z, Decl(noUncheckedIndexedAccessDestructuring.ts, 66, 29)) ({ x, y, z } = numMapPoint); // Should OK ->x : Symbol(x, Decl(noUncheckedIndexedAccessDestructuring.ts, 55, 6)) ->y : Symbol(y, Decl(noUncheckedIndexedAccessDestructuring.ts, 55, 9)) ->z : Symbol(z, Decl(noUncheckedIndexedAccessDestructuring.ts, 55, 12)) +>x : Symbol(x, Decl(noUncheckedIndexedAccessDestructuring.ts, 67, 6)) +>y : Symbol(y, Decl(noUncheckedIndexedAccessDestructuring.ts, 67, 9)) +>z : Symbol(z, Decl(noUncheckedIndexedAccessDestructuring.ts, 67, 12)) >numMapPoint : Symbol(numMapPoint, Decl(noUncheckedIndexedAccessDestructuring.ts, 28, 13)) let q: number; ->q : Symbol(q, Decl(noUncheckedIndexedAccessDestructuring.ts, 57, 7)) +>q : Symbol(q, Decl(noUncheckedIndexedAccessDestructuring.ts, 69, 7)) ({ q } = numMapPoint); // Should error ->q : Symbol(q, Decl(noUncheckedIndexedAccessDestructuring.ts, 58, 6)) +>q : Symbol(q, Decl(noUncheckedIndexedAccessDestructuring.ts, 70, 6)) >numMapPoint : Symbol(numMapPoint, Decl(noUncheckedIndexedAccessDestructuring.ts, 28, 13)) } diff --git a/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.types b/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.types index 8e923b5c82a24..d661e9a75ee4a 100644 --- a/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.types +++ b/tests/baselines/reference/noUncheckedIndexedAccessDestructuring.types @@ -133,6 +133,41 @@ declare const numMapPoint: { x: number, y: number} & { [s: string]: number }; >toFixed : (fractionDigits?: number | undefined) => string } +{ + const { x, ...q } = numMapPoint; +>x : number +>q : { [s: string]: number; y: number; } +>numMapPoint : { x: number; y: number; } & { [s: string]: number; } + + x. +>x. toFixed() : string +>x. toFixed : (fractionDigits?: number | undefined) => string +>x : number + + toFixed(); // Should OK +>toFixed : (fractionDigits?: number | undefined) => string + + q. +>q. y.toFixed() : string +>q. y.toFixed : (fractionDigits?: number | undefined) => string +>q. y : number +>q : { [s: string]: number; y: number; } + + y.toFixed(); // Should OK +>y : number +>toFixed : (fractionDigits?: number | undefined) => string + + q. +>q. z.toFixed() : string +>q. z.toFixed : (fractionDigits?: number | undefined) => string +>q. z : number | undefined +>q : { [s: string]: number; y: number; } + + z.toFixed(); // Should error +>z : number | undefined +>toFixed : (fractionDigits?: number | undefined) => string +} + declare let target_string: string; >target_string : string diff --git a/tests/baselines/reference/nonPrimitiveStrictNull.errors.txt b/tests/baselines/reference/nonPrimitiveStrictNull.errors.txt index 6b26c4d42ac8c..ecab0298e8fd0 100644 --- a/tests/baselines/reference/nonPrimitiveStrictNull.errors.txt +++ b/tests/baselines/reference/nonPrimitiveStrictNull.errors.txt @@ -10,13 +10,13 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(11,1): erro tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(17,7): error TS2339: Property 'toString' does not exist on type 'never'. tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(21,5): error TS2322: Type 'object | null' is not assignable to type 'object'. Type 'null' is not assignable to type 'object'. -tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(26,5): error TS2531: Object is possibly 'null'. -tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(28,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(32,5): error TS2533: Object is possibly 'null' or 'undefined'. -tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(38,5): error TS2531: Object is possibly 'null'. -tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(40,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(44,5): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(46,5): error TS2531: Object is possibly 'null'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(26,5): error TS18047: 'd' is possibly 'null'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(28,5): error TS18048: 'd' is possibly 'undefined'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(32,5): error TS18049: 'd' is possibly 'null' or 'undefined'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(38,5): error TS18047: 'd' is possibly 'null'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(40,5): error TS18048: 'd' is possibly 'undefined'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(44,5): error TS18048: 'd' is possibly 'undefined'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(46,5): error TS18047: 'd' is possibly 'null'. tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(51,14): error TS2344: Type 'number' does not satisfy the constraint 'object'. tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(52,14): error TS2344: Type 'null' does not satisfy the constraint 'object'. tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(53,14): error TS2344: Type 'undefined' does not satisfy the constraint 'object'. @@ -70,17 +70,17 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(53,14): err b = d; // ok d.toString(); // error, object | null ~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18047: 'd' is possibly 'null'. } else { d.toString(); // error, undefined ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'd' is possibly 'undefined'. } if (d == null) { d.toString(); // error, undefined | null ~ -!!! error TS2533: Object is possibly 'null' or 'undefined'. +!!! error TS18049: 'd' is possibly 'null' or 'undefined'. } else { d.toString(); // object } @@ -88,21 +88,21 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts(53,14): err if (d === null) { d.toString(); // error, null ~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18047: 'd' is possibly 'null'. } else { d.toString(); // error, object | undefined ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'd' is possibly 'undefined'. } if (typeof d === 'undefined') { d.toString(); // error, undefined ~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'd' is possibly 'undefined'. } else { d.toString(); // error, object | null ~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18047: 'd' is possibly 'null'. } interface Proxy {} diff --git a/tests/baselines/reference/nullKeyword.errors.txt b/tests/baselines/reference/nullKeyword.errors.txt index b815b61b676bd..43f59c979affb 100644 --- a/tests/baselines/reference/nullKeyword.errors.txt +++ b/tests/baselines/reference/nullKeyword.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/nullKeyword.ts(1,1): error TS2531: Object is possibly 'null'. +tests/cases/compiler/nullKeyword.ts(1,1): error TS18050: The value 'null' cannot be used here. ==== tests/cases/compiler/nullKeyword.ts (1 errors) ==== null.foo; ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/nullishCoalescingOperator11.errors.txt b/tests/baselines/reference/nullishCoalescingOperator11.errors.txt index 45faaea8767ac..11803faf8f5f5 100644 --- a/tests/baselines/reference/nullishCoalescingOperator11.errors.txt +++ b/tests/baselines/reference/nullishCoalescingOperator11.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator11.ts(3,18): error TS2533: Object is possibly 'null' or 'undefined'. +tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator11.ts(3,18): error TS18049: 'f11' is possibly 'null' or 'undefined'. ==== tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator11.ts (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingO let g11 = f11 ?? f11.toFixed() ~~~ -!!! error TS2533: Object is possibly 'null' or 'undefined'. +!!! error TS18049: 'f11' is possibly 'null' or 'undefined'. \ No newline at end of file diff --git a/tests/baselines/reference/nullishCoalescingOperator4.errors.txt b/tests/baselines/reference/nullishCoalescingOperator4.errors.txt index ba8ad2e7ac7c3..dbd3fdbd30ce3 100644 --- a/tests/baselines/reference/nullishCoalescingOperator4.errors.txt +++ b/tests/baselines/reference/nullishCoalescingOperator4.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator4.ts(2,19): error TS2533: Object is possibly 'null' or 'undefined'. -tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator4.ts(3,19): error TS2533: Object is possibly 'null' or 'undefined'. +tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator4.ts(2,19): error TS18049: 'a1' is possibly 'null' or 'undefined'. +tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator4.ts(3,19): error TS18049: 'a1' is possibly 'null' or 'undefined'. ==== tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator4.ts (2 errors) ==== declare const a1: 'literal' | undefined | null const aa1 = a1 ?? a1.toLowerCase() ~~ -!!! error TS2533: Object is possibly 'null' or 'undefined'. +!!! error TS18049: 'a1' is possibly 'null' or 'undefined'. const aa2 = a1 || a1.toLocaleUpperCase() ~~ -!!! error TS2533: Object is possibly 'null' or 'undefined'. +!!! error TS18049: 'a1' is possibly 'null' or 'undefined'. \ No newline at end of file diff --git a/tests/baselines/reference/omittedExpressionForOfLoop.errors.txt b/tests/baselines/reference/omittedExpressionForOfLoop.errors.txt index 145af55d190bd..3393745f88ed9 100644 --- a/tests/baselines/reference/omittedExpressionForOfLoop.errors.txt +++ b/tests/baselines/reference/omittedExpressionForOfLoop.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/omittedExpressionForOfLoop.ts(1,19): error TS2304: Cannot find name 'doesNotExist'. -tests/cases/compiler/omittedExpressionForOfLoop.ts(4,19): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/omittedExpressionForOfLoop.ts(4,19): error TS18050: The value 'undefined' cannot be used here. tests/cases/compiler/omittedExpressionForOfLoop.ts(7,12): error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator. tests/cases/compiler/omittedExpressionForOfLoop.ts(10,12): error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator. @@ -12,7 +12,7 @@ tests/cases/compiler/omittedExpressionForOfLoop.ts(10,12): error TS2488: Type 'n for (const [,] of undefined) { ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. } for (const [,] of []) { diff --git a/tests/baselines/reference/plusOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/plusOperatorWithAnyOtherType.errors.txt index 561215bbd9593..1d8d9f9184800 100644 --- a/tests/baselines/reference/plusOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/plusOperatorWithAnyOtherType.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(34,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(35,24): error TS2531: Object is possibly 'null'. +tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(34,24): error TS18050: The value 'undefined' cannot be used here. +tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(35,24): error TS18050: The value 'null' cannot be used here. tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(46,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(47,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(48,26): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. @@ -42,10 +42,10 @@ tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWith // any type literal var ResultIsNumber7 = +undefined; ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18050: The value 'undefined' cannot be used here. var ResultIsNumber8 = +null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. // any type expressions var ResultIsNumber9 = +ANY2[0]; diff --git a/tests/baselines/reference/privateNameAndAny.errors.txt b/tests/baselines/reference/privateNameAndAny.errors.txt index dbc6209113729..97cad45d67ab5 100644 --- a/tests/baselines/reference/privateNameAndAny.errors.txt +++ b/tests/baselines/reference/privateNameAndAny.errors.txt @@ -1,10 +1,10 @@ tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(9,15): error TS2339: Property '#bar' does not exist on type 'any'. -tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(13,9): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(14,9): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(15,9): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(16,9): error TS2571: Object is of type 'unknown'. +tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(13,9): error TS18046: 'thing' is of type 'unknown'. +tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(14,9): error TS18046: 'thing' is of type 'unknown'. +tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(15,9): error TS18046: 'thing' is of type 'unknown'. +tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(16,9): error TS18046: 'thing' is of type 'unknown'. tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(16,15): error TS2339: Property '#bar' does not exist on type 'any'. -tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(17,9): error TS2571: Object is of type 'unknown'. +tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(17,9): error TS18046: 'thing' is of type 'unknown'. tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(20,15): error TS2339: Property '#foo' does not exist on type 'never'. tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(21,15): error TS2339: Property '#m' does not exist on type 'never'. tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(22,15): error TS2339: Property '#baz' does not exist on type 'never'. @@ -29,21 +29,21 @@ tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(24,15) methodU(thing: unknown) { thing.#foo; ~~~~~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'thing' is of type 'unknown'. thing.#m(); ~~~~~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'thing' is of type 'unknown'. thing.#baz; ~~~~~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'thing' is of type 'unknown'. thing.#bar; ~~~~~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'thing' is of type 'unknown'. ~~~~ !!! error TS2339: Property '#bar' does not exist on type 'any'. thing.#foo(); ~~~~~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'thing' is of type 'unknown'. } methodN(thing: never) { thing.#foo; diff --git a/tests/baselines/reference/privateNameInInExpression(target=es2022).errors.txt b/tests/baselines/reference/privateNameInInExpression(target=es2022).errors.txt index 514d2a85e84a6..126c668fec353 100644 --- a/tests/baselines/reference/privateNameInInExpression(target=es2022).errors.txt +++ b/tests/baselines/reference/privateNameInInExpression(target=es2022).errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.t tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(25,20): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(27,14): error TS2406: The left-hand side of a 'for...in' statement must be a variable or a property access. tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(29,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'boolean'. -tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(43,27): error TS2531: Object is possibly 'null'. +tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(43,27): error TS18047: 'u' is possibly 'null'. tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(114,12): error TS18016: Private identifiers are not allowed outside class bodies. @@ -62,7 +62,7 @@ tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.t if (#field in u) { ~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18047: 'u' is possibly 'null'. u; // good u is Foo } else { u; // good u is object | null diff --git a/tests/baselines/reference/privateNameInInExpression(target=esnext).errors.txt b/tests/baselines/reference/privateNameInInExpression(target=esnext).errors.txt index 514d2a85e84a6..126c668fec353 100644 --- a/tests/baselines/reference/privateNameInInExpression(target=esnext).errors.txt +++ b/tests/baselines/reference/privateNameInInExpression(target=esnext).errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.t tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(25,20): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(27,14): error TS2406: The left-hand side of a 'for...in' statement must be a variable or a property access. tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(29,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'boolean'. -tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(43,27): error TS2531: Object is possibly 'null'. +tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(43,27): error TS18047: 'u' is possibly 'null'. tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(114,12): error TS18016: Private identifiers are not allowed outside class bodies. @@ -62,7 +62,7 @@ tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.t if (#field in u) { ~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18047: 'u' is possibly 'null'. u; // good u is Foo } else { u; // good u is object | null diff --git a/tests/baselines/reference/propertyAccess4.errors.txt b/tests/baselines/reference/propertyAccess4.errors.txt index fc491d8c7a99c..92c4467d050fe 100644 --- a/tests/baselines/reference/propertyAccess4.errors.txt +++ b/tests/baselines/reference/propertyAccess4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/propertyAccess4.ts(1,1): error TS2531: Object is possibly 'null'. +tests/cases/compiler/propertyAccess4.ts(1,1): error TS18050: The value 'null' cannot be used here. ==== tests/cases/compiler/propertyAccess4.ts (1 errors) ==== null.toBAZ(); ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/propertyAccess5.errors.txt b/tests/baselines/reference/propertyAccess5.errors.txt index 4f7e7f4bcd62d..1bad2248d5eb4 100644 --- a/tests/baselines/reference/propertyAccess5.errors.txt +++ b/tests/baselines/reference/propertyAccess5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/propertyAccess5.ts(1,1): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/propertyAccess5.ts(1,1): error TS18050: The value 'undefined' cannot be used here. ==== tests/cases/compiler/propertyAccess5.ts (1 errors) ==== undefined.toBAZ(); ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. \ No newline at end of file +!!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/reverseMappedPartiallyInferableTypes.errors.txt b/tests/baselines/reference/reverseMappedPartiallyInferableTypes.errors.txt index bd3697aaaff1f..42eac6750190e 100644 --- a/tests/baselines/reference/reverseMappedPartiallyInferableTypes.errors.txt +++ b/tests/baselines/reference/reverseMappedPartiallyInferableTypes.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/reverseMappedPartiallyInferableTypes.ts(91,20): error TS2571: Object is of type 'unknown'. +tests/cases/compiler/reverseMappedPartiallyInferableTypes.ts(91,20): error TS18046: 'k' is of type 'unknown'. ==== tests/cases/compiler/reverseMappedPartiallyInferableTypes.ts (1 errors) ==== @@ -94,7 +94,7 @@ tests/cases/compiler/reverseMappedPartiallyInferableTypes.ts(91,20): error TS257 contains(k) { return k.length > 0; ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'k' is of type 'unknown'. } } }); diff --git a/tests/baselines/reference/specialIntersectionsInMappedTypes.errors.txt b/tests/baselines/reference/specialIntersectionsInMappedTypes.errors.txt index 31c9404989468..5208805d9e315 100644 --- a/tests/baselines/reference/specialIntersectionsInMappedTypes.errors.txt +++ b/tests/baselines/reference/specialIntersectionsInMappedTypes.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/specialIntersectionsInMappedTypes.ts(14,1): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/specialIntersectionsInMappedTypes.ts(14,1): error TS18048: 'a.other' is possibly 'undefined'. ==== tests/cases/compiler/specialIntersectionsInMappedTypes.ts (1 errors) ==== @@ -17,5 +17,5 @@ tests/cases/compiler/specialIntersectionsInMappedTypes.ts(14,1): error TS2532: O a.left.length; a.other.length; // Error expected here ~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'a.other' is possibly 'undefined'. \ No newline at end of file diff --git a/tests/baselines/reference/typeofThis.errors.txt b/tests/baselines/reference/typeofThis.errors.txt index a4a3be693aa93..ff8b3dc98a6da 100644 --- a/tests/baselines/reference/typeofThis.errors.txt +++ b/tests/baselines/reference/typeofThis.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts(24,19): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. -tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts(32,19): error TS2532: Object is possibly 'undefined'. +tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts(32,19): error TS18048: 'this' is possibly 'undefined'. tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts(46,23): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts(46,23): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts(52,23): error TS2331: 'this' cannot be referenced in a module or namespace body. @@ -44,7 +44,7 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts(57,24): function Test4(this: { no: number } | undefined) { let x: typeof this.no = 1; ~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS18048: 'this' is possibly 'undefined'. } class Test5 { diff --git a/tests/baselines/reference/unknownType1.errors.txt b/tests/baselines/reference/unknownType1.errors.txt index 3f441448067f0..f42cc88fa7c62 100644 --- a/tests/baselines/reference/unknownType1.errors.txt +++ b/tests/baselines/reference/unknownType1.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/types/unknown/unknownType1.ts(50,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(51,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(52,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(53,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(54,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(55,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(56,6): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(57,6): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(63,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(64,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(65,5): error TS2571: Object is of type 'unknown'. -tests/cases/conformance/types/unknown/unknownType1.ts(66,9): error TS2571: Object is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(50,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(51,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(52,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(53,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(54,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(55,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(56,6): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(57,6): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(63,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(64,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(65,5): error TS18046: 'x' is of type 'unknown'. +tests/cases/conformance/types/unknown/unknownType1.ts(66,9): error TS18046: 'x' is of type 'unknown'. tests/cases/conformance/types/unknown/unknownType1.ts(110,9): error TS2322: Type 'unknown' is not assignable to type 'object'. tests/cases/conformance/types/unknown/unknownType1.ts(111,9): error TS2322: Type 'unknown' is not assignable to type 'string'. tests/cases/conformance/types/unknown/unknownType1.ts(112,9): error TS2322: Type 'unknown' is not assignable to type 'string[]'. @@ -80,28 +80,28 @@ tests/cases/conformance/types/unknown/unknownType1.ts(181,5): error TS2322: Type x !== 10; x >= 0; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. x.foo; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. x[10]; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. x(); // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. x + 1; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. x * 2; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. -x; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. +x; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. } // No property accesses, element accesses, or function calls @@ -109,16 +109,16 @@ tests/cases/conformance/types/unknown/unknownType1.ts(181,5): error TS2322: Type function f11(x: unknown) { x.foo; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. x[5]; // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. x(); // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. new x(); // Error ~ -!!! error TS2571: Object is of type 'unknown'. +!!! error TS18046: 'x' is of type 'unknown'. } // typeof, instanceof, and user defined type predicates diff --git a/tests/baselines/reference/widenedTypes.errors.txt b/tests/baselines/reference/widenedTypes.errors.txt index 67b375570f9b7..e509a1c5ad551 100644 --- a/tests/baselines/reference/widenedTypes.errors.txt +++ b/tests/baselines/reference/widenedTypes.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/widenedTypes.ts(1,1): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. -tests/cases/compiler/widenedTypes.ts(4,1): error TS2531: Object is possibly 'null'. -tests/cases/compiler/widenedTypes.ts(5,7): error TS2531: Object is possibly 'null'. +tests/cases/compiler/widenedTypes.ts(4,1): error TS18050: The value 'null' cannot be used here. +tests/cases/compiler/widenedTypes.ts(5,7): error TS18050: The value 'null' cannot be used here. tests/cases/compiler/widenedTypes.ts(9,14): error TS2695: Left side of comma operator is unused and has no side effects. tests/cases/compiler/widenedTypes.ts(10,1): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/compiler/widenedTypes.ts(17,1): error TS2322: Type 'string' is not assignable to type 'number'. @@ -16,10 +16,10 @@ tests/cases/compiler/widenedTypes.ts(23,39): error TS2322: Type 'number' is not null in {}; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. "" in null; ~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS18050: The value 'null' cannot be used here. for (var a in null) { } diff --git a/tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts b/tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts index 8f50f31c5a9a0..c894f55a25a48 100644 --- a/tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts +++ b/tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts @@ -44,6 +44,18 @@ declare const numMapPoint: { x: number, y: number} & { [s: string]: number }; q.z.toFixed(); // Should error } +{ + const { x, ...q } = numMapPoint; + x. + toFixed(); // Should OK + + q. + y.toFixed(); // Should OK + + q. + z.toFixed(); // Should error +} + declare let target_string: string; declare let target_string_undef: string | undefined;