Implement throwing const re-assignment error. (#3697)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -1506,6 +1506,11 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case VM_OC_THROW_CONST_ERROR:
|
||||
{
|
||||
result = ecma_raise_type_error (ECMA_ERR_MSG ("Constant bindings cannot be reassigned."));
|
||||
goto error;
|
||||
}
|
||||
case VM_OC_COPY_TO_GLOBAL:
|
||||
{
|
||||
uint32_t literal_index;
|
||||
|
||||
Reference in New Issue
Block a user