Skip to content

Commit 54d35c6

Browse files
authored
call ref.func needs to be declared first
1 parent ec004f6 commit 54d35c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

proposals/function-references/Overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Typed references have no canonical default value, because they cannot be null. T
4646
The function `$hof` takes a function pointer as parameter, and is invoked by `$caller`, passing `$inc` as argument:
4747
```wasm
4848
(type $i32-i32 (func (param i32) (result i32)))
49+
(elem declare funcref (ref.func $inc))
4950
5051
(func $hof (param $f (ref $i32-i32)) (result i32)
5152
(i32.add (i32.const 10) (call_ref $i32-i32 (i32.const 42) (local.get $f)))

0 commit comments

Comments
 (0)