summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1225367.js
blob: 4889bb29ab8aa3718dbaf933437f4c5eddf764c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function f() {
    var hits = 0;
    for (var T of [Float32Array, Float64Array, Float32Array]) {
        var arr = new T(1);
        try {
            arr[0] = Symbol.iterator;
        } catch(e) { hits++; }
    }
    for (var T of [Int32Array, Int16Array, Int8Array]) {
        var arr = new T(1);
        try {
            arr[0] = Symbol.iterator;
        } catch(e) { hits++; }
    }
    assertEq(hits, 6);
}
f();