mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Correctly compile mulChecked for Dec
This commit is contained in:
parent
25f3190d33
commit
3a25ec5322
2 changed files with 18 additions and 1 deletions
|
@ -1969,7 +1969,10 @@ fn build_dec_binop<'a, 'ctx>(
|
|||
let val = dec_binop_with_overflow(env, bitcode::DEC_SUB_WITH_OVERFLOW, lhs, rhs);
|
||||
cast_with_overflow_dec_to_roc_type(env, layout_interner, val.into(), return_layout)
|
||||
}
|
||||
NumMulChecked => call_bitcode_fn(env, &[lhs, rhs], bitcode::DEC_MUL_WITH_OVERFLOW),
|
||||
NumMulChecked => {
|
||||
let val = dec_binop_with_overflow(env, bitcode::DEC_MUL_WITH_OVERFLOW, lhs, rhs);
|
||||
cast_with_overflow_dec_to_roc_type(env, layout_interner, val.into(), return_layout)
|
||||
}
|
||||
NumAdd => build_dec_binop_throw_on_overflow(
|
||||
env,
|
||||
parent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue