diff options
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 10b60e0a7..bbc92f09c 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2245,14 +2245,14 @@ void FunctionValidator::visitBrOn(BrOn* curr) { shouldBeTrue( curr->ref->type.isRef(), curr, "br_on_cast ref must have ref type"); } - if (curr->op == BrOnCast) { + if (curr->op == BrOnCast || curr->op == BrOnCastFail) { // Note that an unreachable rtt is not supported: the text and binary // formats do not provide the type, so if it's unreachable we should not // even create a br_on_cast in such a case, as we'd have no idea what it // casts to. shouldBeTrue( curr->rtt->type.isRtt(), curr, "br_on_cast rtt must have rtt type"); - noteBreak(curr->name, curr->getCastType(), curr); + noteBreak(curr->name, curr->getSentType(), curr); } else { shouldBeTrue(curr->rtt == nullptr, curr, "non-cast BrOn must not have rtt"); } |