Conflicts: src/compiler/checker.ts src/compiler/types.ts src/services/services.ts tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt tests/baselines/reference/bestCommonTypeOfTuple.types tests/baselines/reference/bestCommonTypeOfTuple2.types tests/baselines/reference/castingTuple.errors.txt tests/baselines/reference/contextualTypeWithTuple.errors.txt tests/baselines/reference/genericCallWithTupleType.errors.txt tests/baselines/reference/indexerWithTuple.types tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt
21 lines
No EOL
1.1 KiB
Text
21 lines
No EOL
1.1 KiB
Text
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(7,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(12,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
|
|
|
|
==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts (2 errors) ====
|
|
// ++ operator on enum type
|
|
|
|
enum ENUM1 { A, B, "" };
|
|
|
|
// expression
|
|
var ResultIsNumber1 = ++ENUM1["B"];
|
|
var ResultIsNumber2 = ENUM1.B++;
|
|
~~~~~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
|
|
|
// miss assignment operator
|
|
++ENUM1["B"];
|
|
|
|
ENUM1.B++;
|
|
~~~~~~~
|
|
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |