diff options
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 726c70c7c..b102ecb1c 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2530,10 +2530,16 @@ void FunctionValidator::visitRefCast(RefCast* curr) { return; } shouldBeEqual( - curr->intendedType.getBottom(), + curr->type.getHeapType().getBottom(), curr->ref->type.getHeapType().getBottom(), curr, "ref.cast target type and ref type must have a common supertype"); + + // TODO: Remove this restriction + shouldBeEqual(curr->type.getNullability(), + curr->ref->type.getNullability(), + curr, + "ref.cast to a different nullability not yet implemented"); } void FunctionValidator::visitBrOn(BrOn* curr) { |