~ubuntu-branches/ubuntu/trusty/mozjs24/trusty-proposed

« back to all changes in this revision

Viewing changes to js/src/jit-test/tests/basic/forVarInWith.js

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2014-02-11 21:55:34 UTC
  • Revision ID: package-import@ubuntu.com-20140211215534-m1zyq5aj59md3y07
Tags: upstream-24.2.0
ImportĀ upstreamĀ versionĀ 24.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function forVarInWith() {
 
2
    function foo() ({notk:42});
 
3
    function bar() ({p:1, q:2, r:3, s:4, t:5});
 
4
    var o = foo();
 
5
    var a = [];
 
6
    with (o) {
 
7
        for (var k in bar())
 
8
            a[a.length] = k;
 
9
    }
 
10
    return a.join("");
 
11
}
 
12
assertEq(forVarInWith(), "pqrst");