chakra-core/ChakraCore

A question about uninitialized variables

开放

#6,516 创建于 2020年10月5日

 (5 条评论) (0 个反应) (0 位负责人)JavaScript (1,225 个派生)batch import
BugSeverity: 3help wanted

仓库指标

星标
 (9,258 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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?

贡献者指南