diff options
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 3baaacb16..a8bb4a536 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2549,6 +2549,10 @@ void FunctionValidator::visitRefTest(RefTest* curr) { curr->ref->type.isRef(), curr, "ref.test ref must have ref type")) { return; } + if (!shouldBeTrue( + curr->castType.isRef(), curr, "ref.test target must have ref type")) { + return; + } shouldBeEqual( curr->castType.getHeapType().getBottom(), curr->ref->type.getHeapType().getBottom(), |