summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1148883.js
blob: 3e8e3ae7e12a1c887937dde6eccf0699ead65802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function retThis() {
  return this;
}

var res = (function() {
    var x = "678901234567890";
    var g = retThis.bind("123456789012345" + x);
    function f() { return g(); }
    return f;
})()();

// res == new String(...)
assertEq("" + res, "123456789012345678901234567890");

function retArg0(a) {
  return a;
}

res = (function() {
    var x = "678901234567890";
    var g = retArg0.bind(null, "123456789012345" + x);
    function f() { return g(); }
    return f;
})()();

assertEq(res, "123456789012345678901234567890");