summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/forVarInWith.js
blob: 593805642d46298eea238da1f2e286fa400dad4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function forVarInWith() {
    function foo() { return {notk:42}; }
    function bar() { return {p:1, q:2, r:3, s:4, t:5}; };
    var o = foo();
    var a = [];
    with (o) {
        for (var k in bar())
            a[a.length] = k;
    }
    return a.join("");
}
assertEq(forVarInWith(), "pqrst");