summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug535930.js
blob: ac985d18efdf70473c57bbd8e2a2b6985393bc3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(function () {
    p = function () {
        Set()
    };
    var Set = function () {};
    for (var x = 0; x < 5; x++) {
        Set = function (z) {
            return function () {
                [z]
            }
        } (x)
    }
})()

/*
 * bug 535930, mistakenly generated code to GetUpvar and crashed inside the call.
 * so don't crash.
 */