mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
cleanup
This commit is contained in:
parent
eedf746ec7
commit
841d696e6d
3 changed files with 22 additions and 4 deletions
|
@ -788,4 +788,18 @@ mod gen_num {
|
||||||
// f64
|
// f64
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn num_max_int() {
|
||||||
|
assert_evals_to!(
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
# Num.maxInt
|
||||||
|
Num.add (-1) Num.maxInt
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
1,
|
||||||
|
i64
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1505,6 +1505,7 @@ fn update<'a>(
|
||||||
{
|
{
|
||||||
// state.timings.insert(module_id, module_timing);
|
// state.timings.insert(module_id, module_timing);
|
||||||
|
|
||||||
|
dbg!(&state.procedures);
|
||||||
Proc::insert_refcount_operations(arena, &mut state.procedures);
|
Proc::insert_refcount_operations(arena, &mut state.procedures);
|
||||||
|
|
||||||
msg_tx
|
msg_tx
|
||||||
|
|
|
@ -2031,9 +2031,6 @@ pub fn with_hole<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Var(symbol) => panic!("reached Var {}", symbol),
|
|
||||||
// assigned,
|
|
||||||
// Stmt::Ret(symbol),
|
|
||||||
Tag {
|
Tag {
|
||||||
variant_var,
|
variant_var,
|
||||||
name: tag_name,
|
name: tag_name,
|
||||||
|
@ -4110,7 +4107,13 @@ fn reuse_function_symbol<'a>(
|
||||||
original: Symbol,
|
original: Symbol,
|
||||||
) -> Stmt<'a> {
|
) -> Stmt<'a> {
|
||||||
match procs.partial_procs.get(&original) {
|
match procs.partial_procs.get(&original) {
|
||||||
None => result,
|
None => {
|
||||||
|
if original.module_id() != env.home && original.module_id() != ModuleId::ATTR {
|
||||||
|
result
|
||||||
|
} else {
|
||||||
|
result
|
||||||
|
}
|
||||||
|
}
|
||||||
Some(partial_proc) => {
|
Some(partial_proc) => {
|
||||||
let arg_var = arg_var.unwrap_or(partial_proc.annotation);
|
let arg_var = arg_var.unwrap_or(partial_proc.annotation);
|
||||||
// this symbol is a function, that is used by-name (e.g. as an argument to another
|
// this symbol is a function, that is used by-name (e.g. as an argument to another
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue