From 74906514eed3196212b370f09946ba76d1fccee3 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 6 Jun 2016 15:53:09 -0700 Subject: fix if type; if one is none and the other is concrete, still none (#575) --- src/wasm.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wasm.h b/src/wasm.h index 3b318c6ee..a71e09d19 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -974,7 +974,15 @@ public: void finalize() { assert(ifTrue); if (ifFalse) { - type = getReachableWasmType(ifTrue->type, ifFalse->type); + if (ifTrue->type == ifFalse->type) { + type = ifTrue->type; + } else if (isConcreteWasmType(ifTrue->type) && ifFalse->type == unreachable) { + type = ifTrue->type; + } else if (isConcreteWasmType(ifFalse->type) && ifTrue->type == unreachable) { + type = ifFalse->type; + } else { + type = none; + } } } }; -- cgit v1.2.3