Open
Description
Version
chakra-1.11.24
Test case
const x = 'const x';
this.x = 20;
delete this.x;
print(this.x);
print(x);
x = 1;
print(x);
Execution steps
./ChakraCore/out/Release/ch testcase.js
Output
undefined
const x
1
Expected behavior
undefined
const x
testcase.js:6:1 TypeError: invalid assignment to const 'x'
Description
In the above test case, the value of the constant x
cannot be modified, but chakra did successfully modify the value of x
(line 6). Maybe this is a problem with chakra.