mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Changed Int div implementation to use !=
This commit is contained in:
parent
6b6e6f0eec
commit
4b5f7bfded
2 changed files with 10 additions and 10 deletions
|
@ -136,14 +136,6 @@ fn int_div(var_store: &VarStore) -> Def {
|
|||
var_store,
|
||||
),
|
||||
),
|
||||
// Denominator is zero
|
||||
no_region(tag(
|
||||
"Err",
|
||||
vec![tag("DivByZero", Vec::new(), var_store)],
|
||||
var_store,
|
||||
)),
|
||||
)],
|
||||
final_else: Box::new(
|
||||
// denominator was not zero
|
||||
no_region(
|
||||
// Ok (Int.#divUnsafe numerator denominator)
|
||||
|
@ -163,6 +155,14 @@ fn int_div(var_store: &VarStore) -> Def {
|
|||
var_store,
|
||||
),
|
||||
),
|
||||
)],
|
||||
final_else: Box::new(
|
||||
// denominator was zero
|
||||
no_region(tag(
|
||||
"Err",
|
||||
vec![tag("DivByZero", Vec::new(), var_store)],
|
||||
var_store,
|
||||
)),
|
||||
),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue