chakra-core / chakra-core/ChakraCore

A question about uninitialized variables

Open
#6,516 5 comments 0 reactions 0 assignees View on GitHub
Bug help wanted Severity: 3
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

###### Version

chakra-1_11_22

###### Test case

```js
var h = function f(a0 = function () {
a2;
}(), a2) {
};
h();
```

###### Execution steps

```js
./ChakraCore/out/Debug/ch testcase.js
```

###### Output

```

```

###### Expected behavior

```js
ReferenceError: can't access lexical declaration `a2' before initialization
```

###### Description

When executing this test case, `a2` is not initialized before the call, other engines (such as v8, spiderMonkey, JavaScriptCore, etc.) threw a `ReferenceError`, but chakra did not do so. Is this a different implementation of 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.