| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-410649.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 410649; |
| 9 |
var summary = 'function statement and destructuring parameter name clash'; |
| 10 |
var actual = ''; |
| 11 |
var expect = ''; |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
test(); |
| 16 |
|
| 17 |
|
| 18 |
function test() |
| 19 |
{ |
| 20 |
enterFunc ('test'); |
| 21 |
printBugNumber(BUGNUMBER); |
| 22 |
printStatus (summary); |
| 23 |
|
| 24 |
function f(a) { |
| 25 |
function a() { } |
| 26 |
return a; |
| 27 |
} |
| 28 |
|
| 29 |
function g([a, b]) { |
| 30 |
function a() { } |
| 31 |
return a; |
| 32 |
} |
| 33 |
|
| 34 |
expect = 'function'; |
| 35 |
actual = typeof f(1); |
| 36 |
reportCompare(expect, actual, "type for simple parameter case"); |
| 37 |
|
| 38 |
expect = 'function'; |
| 39 |
actual = typeof g([1, 2]); |
| 40 |
reportCompare(expect, actual, "type for destructuring parameter case"); |
| 41 |
|
| 42 |
exitFunc ('test'); |
| 43 |
} |