2.1.16 [ECMA-262/6] Section 12.4.1 Static Semantics: Early Errors
V0045: Postfix increment or decrement gives an early Syntax Error if applied to an immutable binding
The specification states:
-
12.4.1 Static Semantics: Early Errors PostfixExpression : LeftHandSideExpression ++ LeftHandSideExpression -- • It is an early Reference Error if IsValidSimpleAssignmentTarget of LeftHandSideExpression is false.
IE11 Mode (All versions)
It is an early SyntaxError if LeftHandSideExpression
is an immutable binding reference (i.e. a const
declared variable).