chakra-core / chakra-core/ChakraCore

An issue about constant

Open
#6,590 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.