diff options
Diffstat (limited to 'src/wasm-validator.h')
-rw-r--r-- | src/wasm-validator.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 49e2eb5d8..3d9693421 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -71,8 +71,10 @@ public: } else { if (breakTypes[name] == unreachable) { breakTypes[name] = valueType; - } else { - shouldBeEqual(valueType, breakTypes[name], name.str, "breaks to same target must have same type (ignoring unreachable)"); + } else if (valueType != unreachable) { + if (valueType != breakTypes[name]) { + breakTypes[name] = none; // a poison value that must not be consumed + } } } } |