summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js
blob: aa520d1f53f971017e732d78d822600874bb9d61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// |jit-test| --more-compartments; skip-variant-if: --wasm-test-serialization, true; skip-variant-if: --wasm-compiler=ion, true
dbg = newGlobal();
dbg.b = this;
dbg.eval("(" + function() {
  Debugger(b)
} + ")()");
var ins = wasmEvalText(`
   (table 1 funcref)
   (type $d (func (param f64)))
   (func $e
    (export "test")
     f64.const 0.0
     i32.const 0
     return_call_indirect (type $d)
   )
   (elem (i32.const 0) $e)
`);

assertErrorMessage(
  () => ins.exports.test(),
  WebAssembly.RuntimeError, /indirect call signature mismatch/
);