mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 10:41:56 -05:00
Updated error message for TS2539 (#39827)
* Updated error message for TS2539 * Switch to multiple error messages * inline variable Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
@@ -23728,7 +23728,14 @@ namespace ts {
|
||||
if (assignmentKind) {
|
||||
if (!(localOrExportSymbol.flags & SymbolFlags.Variable) &&
|
||||
!(isInJSFile(node) && localOrExportSymbol.flags & SymbolFlags.ValueModule)) {
|
||||
error(node, Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable, symbolToString(symbol));
|
||||
const assignmentError = localOrExportSymbol.flags & SymbolFlags.Enum ? Diagnostics.Cannot_assign_to_0_because_it_is_an_enum
|
||||
: localOrExportSymbol.flags & SymbolFlags.Class ? Diagnostics.Cannot_assign_to_0_because_it_is_a_class
|
||||
: localOrExportSymbol.flags & SymbolFlags.Module ? Diagnostics.Cannot_assign_to_0_because_it_is_a_namespace
|
||||
: localOrExportSymbol.flags & SymbolFlags.Function ? Diagnostics.Cannot_assign_to_0_because_it_is_a_function
|
||||
: localOrExportSymbol.flags & SymbolFlags.Alias ? Diagnostics.Cannot_assign_to_0_because_it_is_an_import
|
||||
: Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable;
|
||||
|
||||
error(node, assignmentError, symbolToString(symbol));
|
||||
return errorType;
|
||||
}
|
||||
if (isReadonlySymbol(localOrExportSymbol)) {
|
||||
|
||||
@@ -2654,6 +2654,26 @@
|
||||
"category": "Error",
|
||||
"code": 2627
|
||||
},
|
||||
"Cannot assign to '{0}' because it is an enum.": {
|
||||
"category": "Error",
|
||||
"code": 2628
|
||||
},
|
||||
"Cannot assign to '{0}' because it is a class.": {
|
||||
"category": "Error",
|
||||
"code": 2629
|
||||
},
|
||||
"Cannot assign to '{0}' because it is a function.": {
|
||||
"category": "Error",
|
||||
"code": 2630
|
||||
},
|
||||
"Cannot assign to '{0}' because it is a namespace.": {
|
||||
"category": "Error",
|
||||
"code": 2631
|
||||
},
|
||||
"Cannot assign to '{0}' because it is an import.": {
|
||||
"category": "Error",
|
||||
"code": 2632
|
||||
},
|
||||
|
||||
"Cannot augment module '{0}' with value exports because it resolves to a non-module entity.": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
tests/cases/compiler/arithAssignTyping.ts(3,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(4,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(5,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(6,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(7,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(8,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(9,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(10,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(11,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(12,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(13,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(14,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/arithAssignTyping.ts(3,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(4,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(5,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(6,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(7,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(8,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(9,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(10,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(11,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(12,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(13,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
tests/cases/compiler/arithAssignTyping.ts(14,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
|
||||
|
||||
==== tests/cases/compiler/arithAssignTyping.ts (12 errors) ====
|
||||
@@ -17,37 +17,37 @@ tests/cases/compiler/arithAssignTyping.ts(14,1): error TS2539: Cannot assign to
|
||||
|
||||
f += ''; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f += 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f -= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f *= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f /= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f %= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f &= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f |= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f <<= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f >>= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f >>>= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
f ^= 1; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/any/assignAnyToEveryType.ts(41,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/types/any/assignAnyToEveryType.ts(41,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/any/assignAnyToEveryType.ts (1 errors) ====
|
||||
@@ -44,7 +44,7 @@ tests/cases/conformance/types/any/assignAnyToEveryType.ts(41,1): error TS2539: C
|
||||
|
||||
M = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
function k<T>(a: T) {
|
||||
a = x;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignToEnum.ts(2,1): error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
tests/cases/compiler/assignToEnum.ts(3,1): error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
tests/cases/compiler/assignToEnum.ts(2,1): error TS2628: Cannot assign to 'A' because it is an enum.
|
||||
tests/cases/compiler/assignToEnum.ts(3,1): error TS2628: Cannot assign to 'A' because it is an enum.
|
||||
tests/cases/compiler/assignToEnum.ts(4,3): error TS2540: Cannot assign to 'foo' because it is a read-only property.
|
||||
tests/cases/compiler/assignToEnum.ts(5,3): error TS2540: Cannot assign to 'foo' because it is a read-only property.
|
||||
|
||||
@@ -8,10 +8,10 @@ tests/cases/compiler/assignToEnum.ts(5,3): error TS2540: Cannot assign to 'foo'
|
||||
enum A { foo, bar }
|
||||
A = undefined; // invalid LHS
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'A' because it is an enum.
|
||||
A = A.bar; // invalid LHS
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'A' because it is an enum.
|
||||
A.foo = 1; // invalid LHS
|
||||
~~~
|
||||
!!! error TS2540: Cannot assign to 'foo' because it is a read-only property.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignToExistingClass.ts(8,13): error TS2539: Cannot assign to 'Mocked' because it is not a variable.
|
||||
tests/cases/compiler/assignToExistingClass.ts(8,13): error TS2629: Cannot assign to 'Mocked' because it is a class.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignToExistingClass.ts (1 errors) ====
|
||||
@@ -11,7 +11,7 @@ tests/cases/compiler/assignToExistingClass.ts(8,13): error TS2539: Cannot assign
|
||||
willThrowError() {
|
||||
Mocked = Mocked || function () { // => Error: Invalid left-hand side of assignment expression.
|
||||
~~~~~~
|
||||
!!! error TS2539: Cannot assign to 'Mocked' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'Mocked' because it is a class.
|
||||
return { myProp: "test" };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(8,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(11,18): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(13,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(17,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(19,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(22,1): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(24,1): error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(17,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(19,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(22,1): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(24,1): error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(27,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(28,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(29,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
@@ -23,10 +23,10 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(5
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(51,11): error TS1005: ';' expected.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(54,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(57,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(58,2): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(59,2): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(60,2): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(61,2): error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(58,2): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(59,2): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(60,2): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(61,2): error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(62,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(63,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(64,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
@@ -67,20 +67,20 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7
|
||||
module M { export var a; }
|
||||
M = value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
C = value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
enum E { }
|
||||
E = value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
|
||||
foo = value;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
|
||||
// literals
|
||||
null = value;
|
||||
@@ -148,16 +148,16 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7
|
||||
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
(M) = value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
(C) = value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
(E) = value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
(foo) = value;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
(null) = value;
|
||||
~~~~~~
|
||||
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/compiler/assignmentToFunction.ts(2,1): error TS2539: Cannot assign to 'fn' because it is not a variable.
|
||||
tests/cases/compiler/assignmentToFunction.ts(8,9): error TS2539: Cannot assign to 'bar' because it is not a variable.
|
||||
tests/cases/compiler/assignmentToFunction.ts(2,1): error TS2630: Cannot assign to 'fn' because it is a function.
|
||||
tests/cases/compiler/assignmentToFunction.ts(8,9): error TS2630: Cannot assign to 'bar' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentToFunction.ts (2 errors) ====
|
||||
function fn() { }
|
||||
fn = () => 3;
|
||||
~~
|
||||
!!! error TS2539: Cannot assign to 'fn' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'fn' because it is a function.
|
||||
|
||||
module foo {
|
||||
function xyz() {
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentToFunction.ts(8,9): error TS2539: Cannot assign t
|
||||
}
|
||||
bar = null;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'bar' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'bar' because it is a function.
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,14 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(13,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(14,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(15,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,2): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2539: Cannot assign to 'M3' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,2): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2631: Cannot assign to 'M3' because it is a namespace.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,11): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,13): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,13): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2539: Cannot assign to 'fn' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,2): error TS2539: Cannot assign to 'fn' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2630: Cannot assign to 'fn' because it is a function.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,2): error TS2630: Cannot assign to 'fn' because it is a function.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(44,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(48,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -18,10 +18,10 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(54,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(55,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(56,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(62,1): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(63,2): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(69,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(70,2): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(62,1): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(63,2): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(69,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(70,2): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (24 errors) ====
|
||||
@@ -53,10 +53,10 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
|
||||
M = { y: 3 }; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
(M) = { y: 3 }; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
module M2 {
|
||||
export module M3 {
|
||||
@@ -65,7 +65,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
|
||||
M3 = { x: 3 }; // Error
|
||||
~~
|
||||
!!! error TS2539: Cannot assign to 'M3' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M3' because it is a namespace.
|
||||
}
|
||||
M2.M3 = { x: 3 }; // OK
|
||||
(M2).M3 = { x: 3 }; // OK
|
||||
@@ -88,10 +88,10 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
function fn() { }
|
||||
fn = () => 3; // Bug 823548: Should be error (fn is not a reference)
|
||||
~~
|
||||
!!! error TS2539: Cannot assign to 'fn' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'fn' because it is a function.
|
||||
(fn) = () => 3; // Should be error
|
||||
~~
|
||||
!!! error TS2539: Cannot assign to 'fn' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'fn' because it is a function.
|
||||
|
||||
function fn2(x: number, y: { t: number }) {
|
||||
x = 3;
|
||||
@@ -131,10 +131,10 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
}
|
||||
E = undefined; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
(E) = undefined; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
|
||||
class C {
|
||||
|
||||
@@ -142,8 +142,8 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
|
||||
C = undefined; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
(C) = undefined; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/assignmentToReferenceTypes.ts(5,1): error TS2708: Cannot use namespace 'M' as a value.
|
||||
tests/cases/compiler/assignmentToReferenceTypes.ts(9,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/compiler/assignmentToReferenceTypes.ts(13,1): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/compiler/assignmentToReferenceTypes.ts(16,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/assignmentToReferenceTypes.ts(9,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/compiler/assignmentToReferenceTypes.ts(13,1): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/compiler/assignmentToReferenceTypes.ts(16,1): error TS2630: Cannot assign to 'f' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentToReferenceTypes.ts (4 errors) ====
|
||||
@@ -17,18 +17,18 @@ tests/cases/compiler/assignmentToReferenceTypes.ts(16,1): error TS2539: Cannot a
|
||||
}
|
||||
C = null;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
enum E {
|
||||
}
|
||||
E = null;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
|
||||
function f() { }
|
||||
f = null;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'f' because it is a function.
|
||||
|
||||
var x = 1;
|
||||
x = null;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(11,1): error TS2708: Cannot use namespace 'M' as a value.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(14,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(17,1): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(14,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(17,1): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(18,3): error TS2540: Cannot assign to 'A' because it is a read-only property.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(21,1): error TS2539: Cannot assign to 'fn' because it is not a variable.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(21,1): error TS2630: Cannot assign to 'fn' because it is a function.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): error TS2693: 'I' only refers to a type, but is being used as a value here.
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): er
|
||||
class C { }
|
||||
C = null; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
enum E { A }
|
||||
E = null; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
E.A = null; // OK per spec, Error per implementation (509581)
|
||||
~
|
||||
!!! error TS2540: Cannot assign to 'A' because it is a read-only property.
|
||||
@@ -37,7 +37,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): er
|
||||
function fn() { }
|
||||
fn = null; // Should be error
|
||||
~~
|
||||
!!! error TS2539: Cannot assign to 'fn' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'fn' because it is a function.
|
||||
|
||||
var v;
|
||||
v = null; // OK
|
||||
|
||||
@@ -8,14 +8,14 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(22,5): 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(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/compoundAssignmentLHSIsValue.ts(26,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(30,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(31,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(33,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(34,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(37,1): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(38,1): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(40,1): error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(41,1): error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(30,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(31,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(33,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(34,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(37,1): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(38,1): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
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(45,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
@@ -47,14 +47,14 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(92,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(95,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(96,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(97,2): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(98,2): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(99,2): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(100,2): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(101,2): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(102,2): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(103,2): error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(104,2): error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(97,2): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(98,2): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(99,2): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(100,2): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(101,2): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(102,2): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(103,2): error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(104,2): error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(105,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(105,1): error TS2531: Object is possibly 'null'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(106,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
@@ -128,32 +128,32 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa
|
||||
module M { export var a; }
|
||||
M *= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
M += value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
C *= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
C += value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
enum E { }
|
||||
E *= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
E += value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
|
||||
foo *= value;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
foo += value;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
|
||||
// literals
|
||||
null *= value;
|
||||
@@ -273,28 +273,28 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa
|
||||
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
(M) *= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
(M) += value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
(C) *= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
(C) += value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
(E) *= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
(E) += value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
(foo) *= value;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
(foo) += value;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
(null) *= value;
|
||||
~~~~~~
|
||||
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
|
||||
@@ -3,10 +3,10 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(13,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(18,5): 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(21,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(25,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(27,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(30,1): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(32,1): error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(25,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(27,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
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(36,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
@@ -23,10 +23,10 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(66,11): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(69,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(72,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(73,2): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(74,2): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(75,2): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(76,2): error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(73,2): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(74,2): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(75,2): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(76,2): error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(77,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(77,1): error TS2531: Object is possibly 'null'.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(78,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
@@ -76,20 +76,20 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm
|
||||
module M { export var a; }
|
||||
M **= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
C **= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
enum E { }
|
||||
E **= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
|
||||
foo **= value;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
|
||||
// literals
|
||||
null **= value;
|
||||
@@ -164,16 +164,16 @@ 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.
|
||||
(M) **= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
(C) **= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
(E) **= value;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
(foo) **= value;
|
||||
~~~
|
||||
!!! error TS2539: Cannot assign to 'foo' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'foo' because it is a function.
|
||||
(null) **= value;
|
||||
~~~~~~
|
||||
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/concatClassAndString.ts(4,1): error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
tests/cases/compiler/concatClassAndString.ts(4,1): error TS2629: Cannot assign to 'f' because it is a class.
|
||||
|
||||
|
||||
==== tests/cases/compiler/concatClassAndString.ts (1 errors) ====
|
||||
@@ -7,5 +7,5 @@ tests/cases/compiler/concatClassAndString.ts(4,1): error TS2539: Cannot assign t
|
||||
|
||||
f += '';
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'f' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'f' because it is a class.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(24,25): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(25,25): error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(26,25): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(25,25): error TS2629: Cannot assign to 'A' because it is a class.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(26,25): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(27,25): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(28,25): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(30,23): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(31,23): error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(32,23): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(31,23): error TS2629: Cannot assign to 'A' because it is a class.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(32,23): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(33,23): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(34,24): error TS2356: An arithmetic operand must be of type 'any', 'number', '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.
|
||||
@@ -81,10 +81,10 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
var ResultIsNumber2 = --A;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'A' because it is a class.
|
||||
var ResultIsNumber3 = --M;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
var ResultIsNumber4 = --obj;
|
||||
~~~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
@@ -97,10 +97,10 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
var ResultIsNumber7 = A--;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'A' because it is a class.
|
||||
var ResultIsNumber8 = M--;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
var ResultIsNumber9 = obj--;
|
||||
~~~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(7,25): error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(8,25): error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(10,23): error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(11,23): error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(7,25): error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(8,25): error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(10,23): error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(11,23): error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(14,25): error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(14,43): error TS2339: Property 'B' does not exist on type 'typeof ENUM'.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(15,23): error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(15,29): error TS2339: Property 'A' does not exist on type 'typeof ENUM'.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(18,3): error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(19,3): error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(21,1): error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(22,1): error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(18,3): error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(19,3): error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(21,1): error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts(22,1): error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts (12 errors) ====
|
||||
@@ -21,17 +21,17 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
|
||||
// enum type var
|
||||
var ResultIsNumber1 = --ENUM;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
var ResultIsNumber2 = --ENUM1;
|
||||
~~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
|
||||
var ResultIsNumber3 = ENUM--;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
var ResultIsNumber4 = ENUM1--;
|
||||
~~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
|
||||
// enum type expressions
|
||||
var ResultIsNumber5 = --(ENUM["A"] + ENUM.B);
|
||||
@@ -48,14 +48,14 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
|
||||
// miss assignment operator
|
||||
--ENUM;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
--ENUM1;
|
||||
~~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
|
||||
ENUM--;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
ENUM1--;
|
||||
~~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/externalModules/b.ts(6,1): error TS2539: Cannot assign to 'x' because it is not a variable.
|
||||
tests/cases/conformance/externalModules/b.ts(7,1): error TS2539: Cannot assign to 'y' because it is not a variable.
|
||||
tests/cases/conformance/externalModules/b.ts(6,1): error TS2632: Cannot assign to 'x' because it is an import.
|
||||
tests/cases/conformance/externalModules/b.ts(7,1): error TS2632: Cannot assign to 'y' because it is an import.
|
||||
tests/cases/conformance/externalModules/b.ts(8,4): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
||||
tests/cases/conformance/externalModules/b.ts(9,4): error TS2540: Cannot assign to 'y' because it is a read-only property.
|
||||
|
||||
@@ -12,10 +12,10 @@ tests/cases/conformance/externalModules/b.ts(9,4): error TS2540: Cannot assign t
|
||||
|
||||
x = 1; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'x' because it is not a variable.
|
||||
!!! error TS2632: Cannot assign to 'x' because it is an import.
|
||||
y = 1; // Error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'y' because it is not a variable.
|
||||
!!! error TS2632: Cannot assign to 'y' because it is an import.
|
||||
a1.x = 1; // Error
|
||||
~
|
||||
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(24,25): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(25,25): error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(26,25): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(25,25): error TS2629: Cannot assign to 'A' because it is a class.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(26,25): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(27,25): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(28,25): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(30,23): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(31,23): error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(32,23): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(31,23): error TS2629: Cannot assign to 'A' because it is a class.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(32,23): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(33,23): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(34,24): error TS2356: An arithmetic operand must be of type 'any', 'number', '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.
|
||||
@@ -76,10 +76,10 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
var ResultIsNumber2 = ++A;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'A' because it is a class.
|
||||
var ResultIsNumber3 = ++M;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
var ResultIsNumber4 = ++obj;
|
||||
~~~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
@@ -92,10 +92,10 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
var ResultIsNumber7 = A++;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'A' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'A' because it is a class.
|
||||
var ResultIsNumber8 = M++;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
var ResultIsNumber9 = obj++;
|
||||
~~~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(7,25): error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(8,25): error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(10,23): error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(11,23): error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(7,25): error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(8,25): error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(10,23): error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(11,23): error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(14,25): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(15,23): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(18,3): error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(19,3): error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(21,1): error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(22,1): error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(18,3): error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(19,3): error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(21,1): error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts(22,1): error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts (10 errors) ====
|
||||
@@ -19,17 +19,17 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
|
||||
// enum type var
|
||||
var ResultIsNumber1 = ++ENUM;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
var ResultIsNumber2 = ++ENUM1;
|
||||
~~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
|
||||
var ResultIsNumber3 = ENUM++;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
var ResultIsNumber4 = ENUM1++;
|
||||
~~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
|
||||
// enum type expressions
|
||||
var ResultIsNumber5 = ++(ENUM[1] + ENUM[2]);
|
||||
@@ -42,14 +42,14 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
|
||||
// miss assignment operator
|
||||
++ENUM;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
++ENUM1;
|
||||
~~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
|
||||
ENUM++;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM' because it is an enum.
|
||||
ENUM1++;
|
||||
~~~~~
|
||||
!!! error TS2539: Cannot assign to 'ENUM1' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'ENUM1' because it is an enum.
|
||||
@@ -5,10 +5,10 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(9,
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(15,5): error TS2322: Type 'boolean' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(17,5): error TS2322: Type 'boolean' is not assignable to type '() => string'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(21,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(21,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(24,5): error TS2322: Type 'boolean' is not assignable to type 'T'.
|
||||
'T' could be instantiated with an arbitrary type which could be unrelated to 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26,1): error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26,1): error TS2630: Cannot assign to 'i' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts (10 errors) ====
|
||||
@@ -48,7 +48,7 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26
|
||||
module M { export var a = 1; }
|
||||
M = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
function i<T>(a: T) {
|
||||
a = x;
|
||||
@@ -58,4 +58,4 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26
|
||||
}
|
||||
i = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'i' because it is a function.
|
||||
@@ -5,10 +5,10 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(9,5)
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(12,5): error TS2322: Type 'number' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(18,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(18,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(21,5): error TS2322: Type 'number' is not assignable to type 'T'.
|
||||
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1): error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1): error TS2630: Cannot assign to 'i' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts (10 errors) ====
|
||||
@@ -45,7 +45,7 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1
|
||||
module M { export var x = 1; }
|
||||
M = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
function i<T>(a: T) {
|
||||
a = x;
|
||||
@@ -55,4 +55,4 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1
|
||||
}
|
||||
i = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'i' because it is a function.
|
||||
@@ -5,10 +5,10 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(9,5)
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(12,5): error TS2322: Type 'string' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(18,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(18,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(21,5): error TS2322: Type 'string' is not assignable to type 'T'.
|
||||
'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(23,1): error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(23,1): error TS2630: Cannot assign to 'i' because it is a function.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5): error TS2322: Type 'string' is not assignable to type 'E'.
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5
|
||||
module M { export var x = 1; }
|
||||
M = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
function i<T>(a: T) {
|
||||
a = x;
|
||||
@@ -56,7 +56,7 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5
|
||||
}
|
||||
i = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'i' because it is a function.
|
||||
|
||||
enum E { A }
|
||||
var j: E = x;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(4,1): error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(4,1): error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(5,3): error TS2540: Cannot assign to 'A' because it is a read-only property.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(9,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(9,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(14,1): error TS2693: 'I' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(17,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(21,1): error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(17,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(21,1): error TS2630: Cannot assign to 'i' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts (6 errors) ====
|
||||
@@ -12,7 +12,7 @@ tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.t
|
||||
enum E { A }
|
||||
E = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
|
||||
!!! error TS2628: Cannot assign to 'E' because it is an enum.
|
||||
E.A = x;
|
||||
~
|
||||
!!! error TS2540: Cannot assign to 'A' because it is a read-only property.
|
||||
@@ -21,7 +21,7 @@ tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.t
|
||||
var f: C;
|
||||
C = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
interface I { foo: string }
|
||||
var g: I;
|
||||
@@ -33,10 +33,10 @@ tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.t
|
||||
module M { export var x = 1; }
|
||||
M = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
function i<T>(a: T) { }
|
||||
// BUG 767030
|
||||
i = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'i' because it is a function.
|
||||
@@ -5,10 +5,10 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(9,5): er
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(12,5): error TS2322: Type 'void' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(18,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(18,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(21,5): error TS2322: Type 'void' is not assignable to type 'T'.
|
||||
'T' could be instantiated with an arbitrary type which could be unrelated to 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(23,1): error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(23,1): error TS2630: Cannot assign to 'i' because it is a function.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(26,1): error TS2322: Type 'typeof E' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(27,1): error TS2322: Type 'E' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): error TS2322: Type '{ f(): void; }' is not assignable to type 'void'.
|
||||
@@ -48,7 +48,7 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e
|
||||
module M { export var x = 1; }
|
||||
M = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
function i<T>(a: T) {
|
||||
a = x;
|
||||
@@ -58,7 +58,7 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e
|
||||
}
|
||||
i = x;
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'i' because it is a function.
|
||||
|
||||
enum E { A }
|
||||
x = E;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3-negative.ts(1,1): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3-negative.ts(1,1): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3-negative.ts (1 errors) ====
|
||||
eval = 1;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3.ts(2,1): error TS1100: Invalid use of 'eval' in strict mode.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3.ts(2,1): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3.ts(2,1): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3.ts (2 errors) ====
|
||||
@@ -8,4 +8,4 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3.ts(2,1):
|
||||
~~~~
|
||||
!!! error TS1100: Invalid use of 'eval' in strict mode.
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode5.ts(2,1): error TS1100: Invalid use of 'eval' in strict mode.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode5.ts(2,1): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode5.ts(2,1): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode5.ts (2 errors) ====
|
||||
@@ -8,4 +8,4 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode5.ts(2,1):
|
||||
~~~~
|
||||
!!! error TS1100: Invalid use of 'eval' in strict mode.
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6-negative.ts(1,1): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6-negative.ts(1,1): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6-negative.ts (1 errors) ====
|
||||
eval++;
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6.ts(2,1): error TS1100: Invalid use of 'eval' in strict mode.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6.ts(2,1): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6.ts(2,1): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6.ts (2 errors) ====
|
||||
@@ -8,4 +8,4 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6.ts(2,1):
|
||||
~~~~
|
||||
!!! error TS1100: Invalid use of 'eval' in strict mode.
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode7.ts(2,3): error TS1100: Invalid use of 'eval' in strict mode.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode7.ts(2,3): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode7.ts(2,3): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode7.ts (2 errors) ====
|
||||
@@ -8,4 +8,4 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode7.ts(2,3):
|
||||
~~~~
|
||||
!!! error TS1100: Invalid use of 'eval' in strict mode.
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
@@ -1,15 +1,15 @@
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(3,3): error TS1100: Invalid use of 'eval' in strict mode.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(3,3): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(3,3): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(4,3): error TS1100: Invalid use of 'eval' in strict mode.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(4,3): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(4,3): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(5,3): error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(5,3): error TS2304: Cannot find name 'arguments'.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(6,3): error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(6,3): error TS2304: Cannot find name 'arguments'.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(7,1): error TS1100: Invalid use of 'eval' in strict mode.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(7,1): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(7,1): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(8,1): error TS1100: Invalid use of 'eval' in strict mode.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(8,1): error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(8,1): error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(9,1): error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(9,1): error TS2304: Cannot find name 'arguments'.
|
||||
tests/cases/compiler/unaryOperatorsInStrictMode.ts(10,1): error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
@@ -23,12 +23,12 @@ tests/cases/compiler/unaryOperatorsInStrictMode.ts(10,1): error TS2304: Cannot f
|
||||
~~~~
|
||||
!!! error TS1100: Invalid use of 'eval' in strict mode.
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
--eval;
|
||||
~~~~
|
||||
!!! error TS1100: Invalid use of 'eval' in strict mode.
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
++arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
@@ -43,12 +43,12 @@ tests/cases/compiler/unaryOperatorsInStrictMode.ts(10,1): error TS2304: Cannot f
|
||||
~~~~
|
||||
!!! error TS1100: Invalid use of 'eval' in strict mode.
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
eval--;
|
||||
~~~~
|
||||
!!! error TS1100: Invalid use of 'eval' in strict mode.
|
||||
~~~~
|
||||
!!! error TS2539: Cannot assign to 'eval' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'eval' because it is a function.
|
||||
arguments++;
|
||||
~~~~~~~~~
|
||||
!!! error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Exit Code: 2
|
||||
Standard output:
|
||||
node_modules/debug/src/browser.js(3,100): error TS2539: Cannot assign to '_typeof' because it is not a variable.
|
||||
node_modules/debug/src/browser.js(3,165): error TS2539: Cannot assign to '_typeof' because it is not a variable.
|
||||
node_modules/debug/src/browser.js(3,100): error TS2539: Cannot assign to '_typeof' because it is immutable.
|
||||
node_modules/debug/src/browser.js(3,165): error TS2539: Cannot assign to '_typeof' because it is immutable.
|
||||
node_modules/debug/src/browser.js(34,74): error TS2339: Property 'type' does not exist on type 'Process'.
|
||||
node_modules/debug/src/browser.js(34,112): error TS2339: Property '__nwjs' does not exist on type 'Process'.
|
||||
node_modules/debug/src/browser.js(45,138): error TS2551: Property 'WebkitAppearance' does not exist on type 'CSSStyleDeclaration'. Did you mean 'webkitAppearance'?
|
||||
|
||||
@@ -11,10 +11,10 @@ node_modules/graceful-fs/graceful-fs.js(74,30): error TS2345: Argument of type '
|
||||
node_modules/graceful-fs/graceful-fs.js(86,13): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/graceful-fs/graceful-fs.js(97,54): error TS2339: Property '__patched' does not exist on type 'typeof import("fs")'.
|
||||
node_modules/graceful-fs/graceful-fs.js(99,8): error TS2339: Property '__patched' does not exist on type 'typeof import("fs")'.
|
||||
node_modules/graceful-fs/graceful-fs.js(226,5): error TS2539: Cannot assign to 'ReadStream' because it is not a variable.
|
||||
node_modules/graceful-fs/graceful-fs.js(227,5): error TS2539: Cannot assign to 'WriteStream' because it is not a variable.
|
||||
node_modules/graceful-fs/graceful-fs.js(247,7): error TS2539: Cannot assign to 'ReadStream' because it is not a variable.
|
||||
node_modules/graceful-fs/graceful-fs.js(257,7): error TS2539: Cannot assign to 'WriteStream' because it is not a variable.
|
||||
node_modules/graceful-fs/graceful-fs.js(226,5): error TS2539: Cannot assign to 'ReadStream' because it is immutable.
|
||||
node_modules/graceful-fs/graceful-fs.js(227,5): error TS2539: Cannot assign to 'WriteStream' because it is immutable.
|
||||
node_modules/graceful-fs/graceful-fs.js(247,7): error TS2539: Cannot assign to 'ReadStream' because it is immutable.
|
||||
node_modules/graceful-fs/graceful-fs.js(257,7): error TS2539: Cannot assign to 'WriteStream' because it is immutable.
|
||||
node_modules/graceful-fs/graceful-fs.js(291,68): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, ...any[]]'.
|
||||
node_modules/graceful-fs/graceful-fs.js(314,70): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, ...any[]]'.
|
||||
node_modules/graceful-fs/graceful-fs.js(363,9): error TS2554: Expected 0 arguments, but got 3.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Exit Code: 2
|
||||
Standard output:
|
||||
node_modules/url-search-params/build/url-search-params.node.js(174,1): error TS2539: Cannot assign to 'URLSearchParams' because it is not a variable.
|
||||
node_modules/url-search-params/build/url-search-params.node.js(174,1): error TS2539: Cannot assign to 'URLSearchParams' because it is immutable.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(10,3): error TS2540: Cannot assign to 'A' because it is a read-only property.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(15,1): error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(15,1): error TS2629: Cannot assign to 'C' because it is a class.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(20,1): error TS2693: 'I' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(23,1): error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(23,1): error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): error TS2630: Cannot assign to 'i' because it is a function.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/null/validNullAssignments.ts (5 errors) ====
|
||||
@@ -24,7 +24,7 @@ tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): err
|
||||
f = null; // ok
|
||||
C = null; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
|
||||
!!! error TS2629: Cannot assign to 'C' because it is a class.
|
||||
|
||||
interface I { foo: string }
|
||||
var g: I;
|
||||
@@ -36,7 +36,7 @@ tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): err
|
||||
module M { export var x = 1; }
|
||||
M = null; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
|
||||
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
|
||||
|
||||
var h: { f(): void } = null;
|
||||
|
||||
@@ -45,4 +45,4 @@ tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): err
|
||||
}
|
||||
i = null; // error
|
||||
~
|
||||
!!! error TS2539: Cannot assign to 'i' because it is not a variable.
|
||||
!!! error TS2630: Cannot assign to 'i' because it is a function.
|
||||
Reference in New Issue
Block a user