diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-05-13 12:38:44 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-05-13 12:38:44 -0700 |
commit | 22d10db3a9b04e5c225b0f472c07dba7ce9dc6d3 (patch) | |
tree | c38b3e8b4a7900d857583de9788b45ca1bfd8890 /src/wasm.cpp | |
parent | 348565b6a9a823c0fee30c96d8d783810d540a78 (diff) | |
parent | 377f1f661d373afe5770d1ff0d3a4772a71ef893 (diff) | |
download | binaryen-22d10db3a9b04e5c225b0f472c07dba7ce9dc6d3.tar.gz binaryen-22d10db3a9b04e5c225b0f472c07dba7ce9dc6d3.tar.bz2 binaryen-22d10db3a9b04e5c225b0f472c07dba7ce9dc6d3.zip |
Merge pull request #493 from WebAssembly/error-improvements
Error handling improvements
Diffstat (limited to 'src/wasm.cpp')
-rw-r--r-- | src/wasm.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wasm.cpp b/src/wasm.cpp index 2157992e3..98268310a 100644 --- a/src/wasm.cpp +++ b/src/wasm.cpp @@ -33,7 +33,11 @@ struct BlockTypeSeeker : public PostWalker<BlockTypeSeeker, Visitor<BlockTypeSee if (other == none) { type = none; } else if (other != unreachable) { - type = other; + if (type == unreachable) { + type = other; + } else if (type != other) { + type = none; // poison value, we saw multiple types; this should not be consumed + } } } } |