| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-352616.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 352616; |
| 9 |
var summary = 'Do not Crash reporting error with |for..in| and |let|'; |
| 10 |
var actual = 'No Crash'; |
| 11 |
var expect = 'No Crash'; |
| 12 |
|
| 13 |
|
| 14 |
test(); |
| 15 |
|
| 16 |
|
| 17 |
function test() |
| 18 |
{ |
| 19 |
enterFunc ('test'); |
| 20 |
printBugNumber(BUGNUMBER); |
| 21 |
printStatus (summary); |
| 22 |
|
| 23 |
expect = /TypeError: (\(let \(b = 1\) 2\).c is not a function|Cannot find function c.)/; |
| 24 |
actual = 'No Error'; |
| 25 |
try |
| 26 |
{ |
| 27 |
for(a in (let (b=1) 2).c(3)) { }; |
| 28 |
} |
| 29 |
catch(ex) |
| 30 |
{ |
| 31 |
actual = ex + ''; |
| 32 |
} |
| 33 |
|
| 34 |
reportMatch(expect, actual, summary + ': 1'); |
| 35 |
|
| 36 |
expect = /TypeError: (\(let \(b = 1, d = 2\) 2\).c is not a function|Cannot find function c.)/; |
| 37 |
actual = 'No Error'; |
| 38 |
try |
| 39 |
{ |
| 40 |
for(a in (let (b=1,d=2) 2).c(3)) { }; |
| 41 |
} |
| 42 |
catch(ex) |
| 43 |
{ |
| 44 |
actual = ex + ''; |
| 45 |
} |
| 46 |
|
| 47 |
reportMatch(expect, actual, summary + ': 2'); |
| 48 |
|
| 49 |
expect = /TypeError: (\(let \(b = 1, d = 2\) 2\).c is not a function|Cannot find function c.)/; |
| 50 |
actual = 'No Error'; |
| 51 |
try |
| 52 |
{ |
| 53 |
for(a in (let (b=1,d=2) 2).c(3)) { }; |
| 54 |
} |
| 55 |
catch(ex) |
| 56 |
{ |
| 57 |
actual = ex + ''; |
| 58 |
} |
| 59 |
|
| 60 |
reportMatch(expect, actual, summary + ': 3'); |
| 61 |
|
| 62 |
exitFunc ('test'); |
| 63 |
} |