summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug883490.js
blob: 2fb27fda52c883a7802eed9172d00ab90c758d4c (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
27
28
29
30
31
32
33
//|jit-test| error: TypeError
function coerceForeign(stdlib, foreign)
{
    "use asm";

    var g = foreign.g;
    var h = foreign.h;

    function f() {
        +g(0);
        +g(1);
        +g(2);
        +h(2);
        +h(3);
    }

    return f;
}
function blaat() {

}

var t = coerceForeign(undefined, {
  g: function(a) {
    if (a == 2)
      var blaat = new blaat();
  },
  h: function(b) {
    print(b);
  }
})

t();