summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/asm.js/testBug893519.js
blob: 8995c6e8754f24dbe5268da29afed0a3ac2b9dad (plain)
1
2
3
4
5
6
7
8
9
10
11
// |jit-test| error:Error

if (!isAsmJSCompilationAvailable()) {
    throw new Error('this test expects an error to be thrown, here it is');
    quit();
}

var g = newGlobal();
evaluate("function h() { function f() { 'use asm'; function g() { return 42 } return g } return f }", { global:g});
var h = clone(g.h);
assertEq(h()()(), 42);