chakra-core/ChakraCore
View on GitHubRedeclaration of a function* inside a block definition
Open
#6,459 opened on Jun 8, 2020
Bughelp wanted
Repository metrics
- Stars
- (9,000 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
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