Closed tanishiking closed 7 months ago
The first argument for ref.cast should be a reference type. However, the code example in MVP.md seems to have a heaptype. (Assuming the $C is defined as follows based on the context)
ref.cast
MVP.md
$C
(module (type $A (sub (struct))) (type $B (sub $A (struct (field i32)))) (type $C (sub $B (struct (field i32 i32)))) (func $castBtoC (param $x (ref $B)) (result (ref $C)) (ref.cast $C (local.get $x)) ) )
$ wasm -d test.wat test.wat:6.15-6.17: syntax error: unexpected token
(Where wasm is a reference interpreter built from https://github.com/WebAssembly/gc/commit/0ba84fb5f993348fc3eb052968bd869aa7bc3875)
wasm
Please let me know if I misunderstand something :)
The first argument for
ref.cast
should be a reference type. However, the code example inMVP.md
seems to have a heaptype. (Assuming the$C
is defined as follows based on the context)(Where
wasm
is a reference interpreter built from https://github.com/WebAssembly/gc/commit/0ba84fb5f993348fc3eb052968bd869aa7bc3875)Please let me know if I misunderstand something :)