chakra-core / chakra-core/ChakraCore
An issue about constant
Open
Bug
ES Spec Conformance
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
###### Version
chakra-1.11.24
###### Test case
```js
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.
Contributor guide
Assessment
This issue has not been assessed yet.