When using wasm-as on the following file:
(module
(func (local $a anyref)
(ref.cast i32 (local.get $a))))
An assertion fail in the code:
Assertion failed: isRef() (/src/src/wasm/wasm-type.cpp: getHeapType: 996)
I believe the assembler should print an error (the above wasm code is, of course, invalid) instead of crashing.
I tested the last version 117. I haven't tested the main branch, maybe the problem do not exist anymore.