(module (type $none_=>_i32 (func (result i32))) (type $none_=>_funcref (func (result funcref))) (elem declare func $0) (func $0 (type $none_=>_i32) (result i32) (i32.const 0) ) (func $test (type $none_=>_funcref) (result funcref) (ref.func $0) ) ) (module (type $none_=>_none (func)) (global $bar i32 (i32.const 0)) (memory $foo 16 16) (export "memory" (memory $foo)) (export "global" (global $bar)) (func $bar (type $none_=>_none) (nop) ) ) (module (type $func (func (result i32))) (global $global$0 (ref $func) (ref.func $foo)) (export "export" (func $2)) (func $foo (type $func) (result i32) (unreachable) ) (func $2 (type $func) (result i32) (call_ref $func (global.get $global$0) ) ) )