summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/gc/bug-1854007.js
blob: c9d6b253692aae1558fc4097f8a3093b040e9d4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// |jit-test| test-also=--wasm-test-serialization; skip-if: !wasmGcEnabled()

let {run} = wasmEvalText(`(module
  (rec (type $$t1 (func (result (ref null $$t1)))))
  (rec (type $$t2 (func (result (ref null $$t2)))))

  (func $$f1 (type $$t1) (ref.null $$t1))
  (func $$f2 (type $$t2) (ref.null $$t2))
  (table funcref (elem $$f1 $$f2))

  (func (export "run")
    (call_indirect (type $$t2) (i32.const 0))
    drop
  )
)`).exports;
run();