You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
519 B

/*
* LeftHandSideExpression allows a much wider syntactical set of
* lvalues than we actually support. Valid LHS values which we
* can't write to must not cause SyntaxError but a ReferenceError.
*
* The side effects of the LHS and the RHS (in that order) must
* happen before the ReferenceError.
*/
/* FIXME: is this correct? Both Rhino and V8 will just throw a
* ReferenceError.
*/
/*===
lhs
rhs
ReferenceError
===*/
try {
eval("print('lhs') = print('rhs');");
} catch(e) {
print(e.name);
}