summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index 4a72f6ea6..fa1351541 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -1014,7 +1014,10 @@ Type BrOn::getSentType() {
return castType;
}
case BrOnCastFail:
- // The same as the result type of br_on_cast.
+ // The same as the result type of br_on_cast (if reachable).
+ if (ref->type == Type::unreachable) {
+ return Type::unreachable;
+ }
if (castType.isNullable()) {
return Type(ref->type.getHeapType(), NonNullable);
} else {