| (module |
| (type $func.0 (func (result i32))) |
| (type $func.1 (func (result funcref))) |
| (elem declare func $0) |
| (func $0 (result i32) |
| (i32.const 0) |
| ) |
| (func $test (result funcref) |
| (ref.func $0) |
| ) |
| ) |
| (module |
| (type $func.0 (func)) |
| (global $bar i32 (i32.const 0)) |
| (memory $foo 16 16) |
| (export "memory" (memory $foo)) |
| (export "global" (global $bar)) |
| (func $bar |
| (nop) |
| ) |
| ) |
| (module |
| (type $func (func (result i32))) |
| (global $global$0 (ref $func) (ref.func $foo)) |
| (export "export" (func $2)) |
| (func $foo (result i32) |
| (unreachable) |
| ) |
| (func $2 (result i32) |
| (call_ref |
| (global.get $global$0) |
| ) |
| ) |
| ) |