f1a2e41a8a
This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
127 lines
6.7 KiB
Plaintext
127 lines
6.7 KiB
Plaintext
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(5,9): error TS2304: Cannot find name 'window'.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(8,5): error TS1005: ';' expected.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(11,5): error TS1005: ';' expected.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(14,5): error TS1005: ';' expected.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(17,5): error TS1005: ';' expected.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(24,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(25,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(26,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(27,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(34,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(35,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(36,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(37,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(44,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(45,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(46,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(47,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(55,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(56,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(57,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
|
|
|
|
==== tests/cases/conformance/expressions/operators/incrementAndDecrement.ts (21 errors) ====
|
|
enum E { A, B, C };
|
|
var x = 4;
|
|
var e = E.B;
|
|
var a: any;
|
|
var w = window;
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'window'.
|
|
|
|
// Assign to expression++
|
|
x++ = 4; // Error
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
|
|
// Assign to expression--
|
|
x-- = 5; // Error
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
|
|
// Assign to++expression
|
|
++x = 4; // Error
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
|
|
// Assign to--expression
|
|
--x = 5; // Error
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
|
|
// Pre and postfix++ on number
|
|
x++;
|
|
x--;
|
|
++x;
|
|
--x;
|
|
++x++; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
--x--; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
++x--; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
--x++; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
|
|
// Pre and postfix++ on enum
|
|
e++;
|
|
e--;
|
|
++e;
|
|
--e;
|
|
++e++; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
--e--; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
++e--; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
--e++; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
|
|
// Pre and postfix++ on value of type 'any'
|
|
a++;
|
|
a--;
|
|
++a;
|
|
--a;
|
|
++a++; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
--a--; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
++a--; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
--a++; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
|
|
|
|
// Pre and postfix++ on other types
|
|
w++; // Error
|
|
w--; // Error
|
|
++w; // Error
|
|
--w; // Error
|
|
++w++; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
--w--; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
++w--; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
--w++; // Error
|
|
~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
|
|
|
|
|