diff options
-rw-r--r-- | src/asm2wasm.h | 1 | ||||
-rw-r--r-- | test/unit.asm.js | 4 | ||||
-rw-r--r-- | test/unit.wast | 15 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index ce5b669d1..c28d60a75 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -963,6 +963,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { auto ret = allocator.alloc<Block>(); ret->list.push_back(process(ast[1])); ret->list.push_back(process(ast[2])); + ret->type = ret->list[1]->type; return ret; } else if (what == SWITCH) { // XXX switch is still in flux in the spec repo, just emit a placeholder diff --git a/test/unit.asm.js b/test/unit.asm.js index 4b706eb26..db761705c 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -41,6 +41,10 @@ function () { d = +(i | 0); d = +(i >>> 0); } + function seq() { + var J = 0.0; + J = (0.1, 5.1) - (3.2, 4.2); + } function z() { } diff --git a/test/unit.wast b/test/unit.wast index 6a33e155b..074804936 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -151,6 +151,21 @@ ) ) ) + (func $seq + (local $J f64) + (set_local $J + (f64.sub + (block + (f64.const 0.1) + (f64.const 5.1) + ) + (block + (f64.const 3.2) + (f64.const 4.2) + ) + ) + ) + ) (func $z (nop) ) |