summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js
blob: ec43665c62d5c11e4713cf61e9683943572003c7 (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: --setpref=wasm_test_serialization=true, 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/
);