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:
Zoltan Herczeg
2020-04-29 15:50:22 +02:00
committed by GitHub
parent 9e6c44be4f
commit 4b780507e1
14 changed files with 220 additions and 52 deletions
+5
View File
@@ -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;