diff options
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 386f89060..c6fb361bd 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -6920,14 +6920,6 @@ bool WasmBinaryBuilder::maybeVisitRefCast(Expression*& out, uint32_t code) { } else { nullability = code == BinaryConsts::RefCast ? NonNullable : Nullable; } - // Only accept instructions emulating the legacy behavior for now. - if (ref->type.isRef()) { - if (nullability == NonNullable && ref->type.isNullable()) { - throwError("ref.cast on nullable input not yet supported"); - } else if (nullability == Nullable && ref->type.isNonNullable()) { - throwError("ref.cast null on non-nullable input not yet supported"); - } - } auto safety = code == BinaryConsts::RefCastNop ? RefCast::Unsafe : RefCast::Safe; auto type = Type(heapType, nullability); |