chakra-core/ChakraCore

Redeclaration of a function* inside a block definition

开放

#6,459 创建于 2020年6月8日

 (2 条评论) (0 个反应) (0 位负责人)JavaScript (1,225 个派生)batch import
Bughelp wanted

仓库指标

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

描述

Hi everyone, I found a case of redeclaration of a generator function inside a block definition.

version: 1.11.19 OS: Linux Ubuntu 19.10 x64

steps to reproduce:

{ function* f() { yield 1 } function f() { print(2) } } f() Actual results: 2

Expected results: SyntaxError: Identifier 'f' has already been declared

V8, SpiderMonkey works as expected.

cinfuzz

贡献者指南