mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
use IntOrFloat::*
This commit is contained in:
parent
a0c4e91792
commit
762b2c7b10
1 changed files with 4 additions and 2 deletions
|
@ -335,13 +335,15 @@ fn from_can<'a>(
|
|||
}
|
||||
|
||||
Call(boxed, loc_args, _) => {
|
||||
use IntOrFloat::*;
|
||||
|
||||
let (fn_var, loc_expr, ret_var) = *boxed;
|
||||
|
||||
let specialize_builtin_functions = {
|
||||
|symbol, subs: &Subs| match symbol {
|
||||
Symbol::NUM_ADD => match to_int_or_float(subs, ret_var) {
|
||||
IntOrFloat::FloatType => Symbol::FLOAT_ADD,
|
||||
IntOrFloat::IntType => Symbol::INT_ADD,
|
||||
FloatType => Symbol::FLOAT_ADD,
|
||||
IntType => Symbol::INT_ADD,
|
||||
},
|
||||
_ => symbol,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue