Closed
Bug 1317374
Opened 9 years ago
Closed 9 years ago
Annex B.3.3.1 should not be applied when a parameter with the same name is present
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: anba, Assigned: shu)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
2.00 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
Test case:
---
(function(f) {
if (true) function f() { }
assertEq(f, 123);
}(123));
---
Expected: Passes
Actual: Throws "Error: Assertion failed: got function f() { }, expected 123"
ES2017 spec:
The second condition in B.3.3.1, step 1.a.ii doesn't seem to be checked in SpiderMonkey:
---
If replacing the FunctionDeclaration f with a VariableStatement that has F as a BindingIdentifier would not produce any Early Errors for func
and
F is not an element of parameterNames, then [...]
---
https://tc39.github.io/ecma262/#sec-web-compat-functiondeclarationinstantiation
Updated•9 years ago
|
Flags: needinfo?(shu)
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8818123 -
Flags: review?(jwalden+bmo)
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(shu)
Updated•9 years ago
|
Attachment #8818123 -
Flags: review?(jwalden+bmo) → review+
Pushed by shu@rfrn.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4dc794806128
Don't do Annex B lexical function behavior when redeclaring a parameter name. (r=Waldo)
I had to back this out for spidermonkey bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=68988367&repo=mozilla-inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e96ce6d55f7
Flags: needinfo?(shu)
Pushed by shu@rfrn.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4f4bae3e495a
Don't do Annex B lexical function behavior when redeclaring a parameter name. (r=Waldo)
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(shu)
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Updated•9 years ago
|
Assignee: nobody → shu
status-firefox52:
affected → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•