TypeScript/tests/baselines/reference/decrementAndIncrementOperators.errors.txt

80 lines
4.2 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/decrementAndIncrementOperators.ts(4,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(6,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(7,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(9,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(10,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(12,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(13,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(15,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(16,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(18,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(19,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(21,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
tests/cases/compiler/decrementAndIncrementOperators.ts(22,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/decrementAndIncrementOperators.ts (13 errors) ====
var x = 0;
// errors
1 ++;
~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
(1)++;
~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
(1)--;
~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
++(1);
~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
--(1);
~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
(1 + 2)++;
~~~~~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
(1 + 2)--;
~~~~~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
++(1 + 2);
~~~~~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
--(1 + 2);
~~~~~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
(x + x)++;
~~~~~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
(x + x)--;
~~~~~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
++(x + x);
~~~~~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
--(x + x);
~~~~~~~
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
2014-07-13 01:04:16 +02:00
//OK
x++;
x--;
++x;
--x;
(x)++;
--(x);
((x))++;
((x))--;
x[x++]++;