mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Implemented div unsafe
This commit is contained in:
parent
aa72619952
commit
0cfed05008
6 changed files with 32 additions and 16 deletions
|
@ -285,18 +285,18 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
Box::new(SolvedType::Wildcard),
|
||||
);
|
||||
|
||||
// // div : Int, Int -> Result Int [ DivByZero ]*
|
||||
// add_type(
|
||||
// Symbol::INT_DIV,
|
||||
// SolvedType::Func(
|
||||
// vec![int_type(), int_type()],
|
||||
// Box::new(result_type(flex(TVAR1), div_by_zero.clone())),
|
||||
// ),
|
||||
// );
|
||||
// div : Int, Int -> Result Int [ DivByZero ]*
|
||||
add_type(
|
||||
Symbol::INT_DIV,
|
||||
SolvedType::Func(
|
||||
vec![int_type(), int_type()],
|
||||
Box::new(result_type(flex(TVAR1), div_by_zero.clone())),
|
||||
),
|
||||
);
|
||||
|
||||
// div : Int, Int -> Int
|
||||
add_type(
|
||||
Symbol::INT_DIV,
|
||||
Symbol::INT_DIV_UNSAFE,
|
||||
SolvedType::Func(vec![int_type(), int_type()], Box::new(int_type())),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue