Accepting new baselines

This commit is contained in:
Anders Hejlsberg
2016-01-18 17:57:42 -08:00
parent d3be38ea2f
commit 723475b656
7 changed files with 148 additions and 148 deletions
@@ -1,4 +1,4 @@
tests/cases/compiler/file2.ts(1,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/file2.ts(1,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
==== tests/cases/compiler/file1.ts (0 errors) ====
@@ -8,4 +8,4 @@ tests/cases/compiler/file2.ts(1,1): error TS2449: The operand of an increment or
==== tests/cases/compiler/file2.ts (1 errors) ====
x++;
~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
@@ -1,20 +1,20 @@
tests/cases/compiler/constDeclarations-access2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(18,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(19,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(20,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(21,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(18,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(19,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(20,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(21,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access2.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
==== tests/cases/compiler/constDeclarations-access2.ts (17 errors) ====
@@ -24,57 +24,57 @@ tests/cases/compiler/constDeclarations-access2.ts(23,3): error TS2449: The opera
// Errors
x = 1;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x += 2;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x -= 3;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x *= 4;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x /= 5;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x %= 6;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x <<= 7;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x >>= 8;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x >>>= 9;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x &= 10;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x |= 11;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x ^= 12;
~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
x++;
~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
x--;
~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
++x;
~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
--x;
~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
++((x));
~~~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
// OK
var a = x + 1;
@@ -1,21 +1,21 @@
tests/cases/compiler/constDeclarations-access3.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(21,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(24,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(26,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access3.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(21,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(24,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(26,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access3.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
==== tests/cases/compiler/constDeclarations-access3.ts (18 errors) ====
@@ -28,61 +28,61 @@ tests/cases/compiler/constDeclarations-access3.ts(28,1): error TS2450: Left-hand
// Errors
M.x = 1;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x += 2;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x -= 3;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x *= 4;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x /= 5;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x %= 6;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x <<= 7;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x >>= 8;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x >>>= 9;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x &= 10;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x |= 11;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x ^= 12;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x++;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
M.x--;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
++M.x;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
--M.x;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
++((M.x));
~~~~~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
M["x"] = 0;
~~~~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
// OK
var a = M.x + 1;
@@ -1,21 +1,21 @@
tests/cases/compiler/constDeclarations-access4.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(21,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(24,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(26,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations-access4.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(21,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(24,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(26,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-access4.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
==== tests/cases/compiler/constDeclarations-access4.ts (18 errors) ====
@@ -28,61 +28,61 @@ tests/cases/compiler/constDeclarations-access4.ts(28,1): error TS2450: Left-hand
// Errors
M.x = 1;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x += 2;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x -= 3;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x *= 4;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x /= 5;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x %= 6;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x <<= 7;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x >>= 8;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x >>>= 9;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x &= 10;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x |= 11;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x ^= 12;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
M.x++;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
M.x--;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
++M.x;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
--M.x;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
++((M.x));
~~~~~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
M["x"] = 0;
~~~~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
// OK
var a = M.x + 1;
@@ -1,21 +1,21 @@
tests/cases/compiler/constDeclarations_access_2.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(17,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(18,1): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(19,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(20,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(22,3): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
tests/cases/compiler/constDeclarations_access_2.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(17,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(18,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(19,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(20,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(22,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
==== tests/cases/compiler/constDeclarations_access_2.ts (18 errors) ====
@@ -24,61 +24,61 @@ tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-han
// Errors
m.x = 1;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x += 2;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x -= 3;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x *= 4;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x /= 5;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x %= 6;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x <<= 7;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x >>= 8;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x >>>= 9;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x &= 10;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x |= 11;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m.x ^= 12;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
m
m.x++;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
m.x--;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
++m.x;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
--m.x;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
++((m.x));
~~~~~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
m["x"] = 0;
~~~~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
// OK
var a = m.x + 1;
@@ -4,7 +4,7 @@ tests/cases/compiler/constDeclarations-errors.ts(5,7): error TS1155: 'const' dec
tests/cases/compiler/constDeclarations-errors.ts(5,11): error TS1155: 'const' declarations must be initialized
tests/cases/compiler/constDeclarations-errors.ts(5,15): error TS1155: 'const' declarations must be initialized
tests/cases/compiler/constDeclarations-errors.ts(5,27): error TS1155: 'const' declarations must be initialized
tests/cases/compiler/constDeclarations-errors.ts(10,27): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-errors.ts(10,27): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
tests/cases/compiler/constDeclarations-errors.ts(13,11): error TS1155: 'const' declarations must be initialized
tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' declarations must be initialized
@@ -33,7 +33,7 @@ tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' d
// error, assigning to a const
for(const c8 = 0; c8 < 1; c8++) { }
~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
// error, can not be unintalized
for(const c9; c9 < 1;) { }
+2 -2
View File
@@ -1,5 +1,5 @@
tests/cases/conformance/es6/for-ofStatements/for-of2.ts(1,7): error TS1155: 'const' declarations must be initialized
tests/cases/conformance/es6/for-ofStatements/for-of2.ts(2,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a previously defined constant.
tests/cases/conformance/es6/for-ofStatements/for-of2.ts(2,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property.
==== tests/cases/conformance/es6/for-ofStatements/for-of2.ts (2 errors) ====
@@ -8,4 +8,4 @@ tests/cases/conformance/es6/for-ofStatements/for-of2.ts(2,6): error TS2485: The
!!! error TS1155: 'const' declarations must be initialized
for (v of []) { }
~
!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a previously defined constant.
!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property.