call_indirect4.wat 268 B

12345678910111213
  1. (module
  2. (func $add (result i64)
  3. i64.const 13
  4. )
  5. (func $sub (result i64)
  6. i64.const 4
  7. )
  8. (table 0 anyfunc)
  9. (func $test (result i64)
  10. i32.const $sub ;; calling $add
  11. call_indirect (type 0) ;; type 0 (the only type used in this function)
  12. )
  13. )