chakra-core/ChakraCore

Redeclaration of a function* inside a block definition

オープン

#6,459 opened on 2020/06/08

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

Repository metrics

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

説明

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

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