chakra-core/ChakraCore

Redeclaration of a function* inside a block definition

Open

#6.459 geöffnet am 8. Juni 2020

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1.374 Forks)batch import
Bughelp wanted

Repository-Metriken

Stars
 (9.000 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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

Contributor Guide