chakra-core/ChakraCore

A question about uninitialized variables

オープン

#6,516 opened on 2020/10/05

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (1,225 件のフォーク)batch import
BugSeverity: 3help wanted

Repository metrics

Stars
 (9,258 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Version

chakra-1_11_22

Test case
var h = function f(a0 = function () {
  a2;
}(), a2) {
};
h();
Execution steps
./ChakraCore/out/Debug/ch testcase.js
Output
Expected behavior
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?

コントリビューターガイド