You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Evaluating array.length = nonNumber does not conform with the ECMAScript specification.
Steps to Reproduce
typeof([].length="4")
Actual behavior
"number"
Expected behavior
"string"
Other information Evaluation of AssignmentExpression : LeftHandSideExpression `=` AssignmentExpression when |LeftHandSideExpression| is not an object or array literal and the right-hand-side |AssignmentExpression| is not a function definition is specified in step 1.e to return the result of evaluating that |AssignmentExpression| in step 1.c.
Basically, even though the intervening PutValue can perform arbitrary processing on that value (as is the case when setting the length of an array ends up in ArraySetLength and the value is coerced to a uint32 number), the assignment expression itself must evaluate to the input of that process rather than its output.
Note also that this affects all assignment operators, e.g. Array(1).length += "e2" should be the string "1e2".
The text was updated successfully, but these errors were encountered:
Environment: XS 13.0.0 32 4
Description
Evaluating
array.length = nonNumber
does not conform with the ECMAScript specification.Steps to Reproduce
Actual behavior
"number"
Expected behavior
"string"
Other information
Evaluation of
AssignmentExpression : LeftHandSideExpression `=` AssignmentExpression
when |LeftHandSideExpression| is not an object or array literal and the right-hand-side |AssignmentExpression| is not a function definition is specified in step 1.e to return the result of evaluating that |AssignmentExpression| in step 1.c.Basically, even though the intervening PutValue can perform arbitrary processing on that value (as is the case when setting the length of an array ends up in ArraySetLength and the value is coerced to a uint32 number), the assignment expression itself must evaluate to the input of that process rather than its output.
Note also that this affects all assignment operators, e.g.
Array(1).length += "e2"
should be the string "1e2".The text was updated successfully, but these errors were encountered: