diff options
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r-- | src/asm2wasm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index f7f084376..d8a2053be 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -960,7 +960,9 @@ void Asm2WasmBuilder::processAsm(Ref ast) { val->type = val->value.type = type->params[i]; curr->operands.push_back(val); } else if (curr->operands[i]->type != type->params[i]) { - assert(type->params[i] == f64); + // if the param is used, then we have overloading here and the combined type must be f64; + // if this is an unreachable param, then it doesn't matter. + assert(type->params[i] == f64 || curr->operands[i]->type == unreachable); // overloaded, upgrade to f64 switch (curr->operands[i]->type) { case i32: curr->operands[i] = parent->builder.makeUnary(ConvertSInt32ToFloat64, curr->operands[i]); break; |