Closed
Bug 1359575
Opened 7 years ago
Closed 7 years ago
Report SyntaxError if GeneratorDeclaration/AsyncFunctionDeclaration is redeclared in block-scope
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(1 file, 1 obsolete file)
8.41 KB,
patch
|
anba
:
review+
|
Details | Diff | Splinter Review |
|{ function* f() {} function* f() {} }| and also |{ function* f() {} function f() {} }| should report an early SyntaxError. Only duplicate FunctionDeclarations are allowed in a block scope. B.3.3.4 Changes to Block Static Semantics: Early Errors: https://tc39.github.io/ecma262/#sec-block-duplicates-allowed-static-semantics
Updated•7 years ago
|
status-firefox57:
affected → ---
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•7 years ago
|
||
This adds a new DeclarationKind::SloppyLexicalFunction, so we can more easily differentiate between proper lexical functions and sloppy lexical functions. I've removed the "pc->sc()->strict()" condition in Parser::noteDeclaredName(), because DeclarationKind::SloppyLexicalFunction (and DeclarationKind::VarForAnnexBLexicalFunction) already imply non-strict mode. I'll prepare a test262 PR for test coverage.
Attachment #8863885 -
Flags: review?(shu)
Comment 2•7 years ago
|
||
Comment on attachment 8863885 [details] [diff] [review] bug1359575.patch Review of attachment 8863885 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thanks for the patch.
Attachment #8863885 -
Flags: review?(shu) → review+
Assignee | ||
Comment 3•7 years ago
|
||
Test262 PR: https://github.com/tc39/test262/pull/1023
Assignee | ||
Comment 4•7 years ago
|
||
Updated to apply cleanly on inbound, carrying r+.
Attachment #8863885 -
Attachment is obsolete: true
Attachment #8867840 -
Flags: review+
Assignee | ||
Comment 5•7 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9408d65898d1bb7032a4032353340117bbd926af
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/cb4c204b5fcd Report SyntaxError if GeneratorDeclaration/AsyncFunctionDeclaration is redeclared in block-scope. r=shu
Keywords: checkin-needed
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cb4c204b5fcd
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•