Implement ToPropertyKey operation (#3966)
From ES 6 the ToPropertyKey operation is used to convert elements to a valid property key. This "new" method uses the ToPrimitive operation which can call the `@@ToPrimitive` well-known symbol to convert the given element to a key. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
@@ -159,7 +159,7 @@ opfunc_in (ecma_value_t left_value, /**< left value */
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("Expected an object in 'in' check."));
|
||||
}
|
||||
|
||||
ecma_string_t *property_name_p = ecma_op_to_prop_name (left_value);
|
||||
ecma_string_t *property_name_p = ecma_op_to_property_key (left_value);
|
||||
|
||||
if (JERRY_UNLIKELY (property_name_p == NULL))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user