| (module | |
| (type $func (func)) | |
| (import "primary" "global" (global $gimport funcref)) | |
| (table $table 10 funcref) | |
| (func $caller (export "caller") | |
| ;; Do an indirect call from the table, writing the imported funcref first. | |
| (table.set $table | |
| (i32.const 1) | |
| (global.get $gimport) | |
| ) | |
| (return_call_indirect (type $func) | |
| (i32.const 1) | |
| ) | |
| ) | |
| ) | |