mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
1317374 - Don't do Annex B lexical function behavior when redeclaring a parameter name.
This commit is contained in:
parent
146dbe7bee
commit
8350dfc515
5 changed files with 27 additions and 3 deletions
|
|
@ -0,0 +1,16 @@
|
|||
// Annex B.3.3.1 disallows Annex B lexical function behavior when redeclaring a
|
||||
// parameter.
|
||||
|
||||
(function(f) {
|
||||
if (true) function f() { }
|
||||
assertEq(f, 123);
|
||||
}(123));
|
||||
|
||||
(function(f) {
|
||||
{ function f() { } }
|
||||
assertEq(f, 123);
|
||||
}(123));
|
||||
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
|
|
@ -20,7 +20,7 @@ function test()
|
|||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
expect = 'function x() {}';
|
||||
expect = '1';
|
||||
|
||||
function g(x) { if (1) function x() {} return x; }
|
||||
print(actual = g(1) + '');
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ function test()
|
|||
|
||||
var r = f(0);
|
||||
|
||||
if (typeof(r[0]) != "function")
|
||||
if (typeof(r[0]) != "number")
|
||||
actual += "Bad r[0]";
|
||||
|
||||
if (typeof(r[1]) != "function")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue