mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
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 738cf094bd.
* 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>
This commit is contained in:
co-authored by
Nathan Shively-Sanders
parent
a3f51b3b82
commit
8b35c1300e
+42
-5
@@ -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;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
+240
-240
File diff suppressed because it is too large
Load Diff
+160
-160
@@ -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'.
|
||||
!!! error TS18050: The value 'null' cannot be used here.
|
||||
+160
-160
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
+240
-240
File diff suppressed because it is too large
Load Diff
+160
-160
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
@@ -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'.
|
||||
!!! error TS18050: The value 'null' cannot be used here.
|
||||
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
@@ -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'.
|
||||
!!! error TS18050: The value 'null' cannot be used here.
|
||||
@@ -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]
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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: 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;
|
||||
|
||||
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
+16
-16
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
+12
-12
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
+16
-16
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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<T extends Record<keyof T, string> | 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;
|
||||
}
|
||||
|
||||
@@ -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: <T>(value: T) => asserts value is NonNullable<T>;
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -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.
|
||||
|
||||
@@ -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'.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+24
-24
@@ -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'.
|
||||
!!! error TS18050: The value 'null' cannot be used here.
|
||||
+16
-16
@@ -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'.
|
||||
!!! error TS18050: The value 'null' cannot be used here.
|
||||
+16
-16
@@ -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.
|
||||
|
||||
+24
-24
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
+16
-16
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
@@ -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'.
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 '';
|
||||
|
||||
+4
-4
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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'.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 =-;
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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'.
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<T extends object> {}
|
||||
|
||||
@@ -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'.
|
||||
!!! error TS18050: The value 'null' cannot be used here.
|
||||
@@ -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'.
|
||||
|
||||
|
||||
|
||||
@@ -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'.
|
||||
|
||||
@@ -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 []) {
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'.
|
||||
!!! error TS18050: The value 'null' cannot be used here.
|
||||
@@ -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'.
|
||||
!!! error TS18050: The value 'undefined' cannot be used here.
|
||||
@@ -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'.
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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'.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) { }
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user