mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
add different variants of addition
This commit is contained in:
parent
455b73e8bd
commit
fb4a796e07
9 changed files with 136 additions and 53 deletions
|
@ -258,7 +258,7 @@ fn num_add_checked(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
|||
//
|
||||
// if arg_3.b then
|
||||
// # overflow
|
||||
// Err IntOverflow
|
||||
// Err Overflow
|
||||
// else
|
||||
// # all is well
|
||||
// Ok arg_3.a
|
||||
|
@ -281,7 +281,7 @@ fn num_add_checked(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
|||
// overflow!
|
||||
no_region(tag(
|
||||
"Err",
|
||||
vec![tag("DivByZero", Vec::new(), var_store)],
|
||||
vec![tag("Overflow", Vec::new(), var_store)],
|
||||
var_store,
|
||||
)),
|
||||
)],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue