Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feedback: add test
  • Loading branch information
kripken committed Jul 23, 2024
commit 3abe58a8cc78560850897802a0952bc34015a156
7 changes: 7 additions & 0 deletions src/wasm/wasm-validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2791,6 +2791,13 @@ void FunctionValidator::visitRefCast(RefCast* curr) {
"ref.cast target type and ref type must have a common supertype")) {
return;
}
// Also error (more generically) on i32 and anything else invalid here.
if (!shouldBeTrue(
curr->type.isRef(),
curr,
"ref.cast must have ref type")) {
return;
}
shouldBeEqual(
curr->type.getHeapType().getBottom(),
curr->ref->type.getHeapType().getBottom(),
Expand Down